如何在程序結束時使它成爲另一個輸入,以便表單重新設置,並根據新輸入創建另一個表單?在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