J
John Salerno
Ok, I made some changes and want to see what you guys think, as far as
syntax and logic, etc. What I want it to do is show the number of
minutes remaining each minute, and then beep at the end. Is there a
better way to do the loops?
using System;
using System.Threading;
class Timer
{
static void Main()
{
Console.Write("Enter the number of minutes to wait: ");
int iTime = Int32.Parse(Console.ReadLine());
for (int i = iDelay; i > 0; i--)
{
Console.WriteLine("{0} minute(s) remaining.", i);
Thread.Sleep(60000);
}
Console.Write("{0} minutes have elapsed", iTime);
for (int i = 3; i > 0; i--)
{
Console.Write("\a");
Thread.Sleep(1000);
}
}
syntax and logic, etc. What I want it to do is show the number of
minutes remaining each minute, and then beep at the end. Is there a
better way to do the loops?
using System;
using System.Threading;
class Timer
{
static void Main()
{
Console.Write("Enter the number of minutes to wait: ");
int iTime = Int32.Parse(Console.ReadLine());
for (int i = iDelay; i > 0; i--)
{
Console.WriteLine("{0} minute(s) remaining.", i);
Thread.Sleep(60000);
}
Console.Write("{0} minutes have elapsed", iTime);
for (int i = 3; i > 0; i--)
{
Console.Write("\a");
Thread.Sleep(1000);
}
}