如何在程序结束时使它成为另一个输入,以便表单重新设置,并根据新输入创建另一个表单?在c中循环一个表格#
static void Main()
{
String totalsecondsstring;
int totalseconds, hour, minutes, second;
Console.WriteLine("How long did the race take (in seconds)?");
totalsecondsstring = Console.ReadLine();
totalseconds = Convert.ToInt32(totalsecondsstring);
hour = totalseconds/3600;
minutes = (totalseconds - (hour * 3600))/60;
second = (totalseconds - (hour * 3600)) - (minutes * 60);
Console.Write("Runers Time\n");
Console.WriteLine("-----------\n");
Console.WriteLine("{0,-5} | {1,-5} | {2,-5} | {3,-5}", "Runner ", hour + " hours", minutes + " minutes", second + " seconds");
}
在编程时在“Form”单词周围晃动时要小心。 *尤其是* .NET编程。这不是一种形式。其控制台应用程序。 – BradleyDotNET 2015-02-11 18:13:17