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.Threadin g;
class Timer
{
static void Main()
{
Console.Write(" Enter the number of minutes to wait: ");
int iTime = Int32.Parse(Con sole.ReadLine() );
for (int i = iDelay; i > 0; i--)
{
Console.WriteLi ne("{0} minute(s) remaining.", i);
Thread.Sleep(60 000);
}
Console.Write(" {0} minutes have elapsed", iTime);
for (int i = 3; i > 0; i--)
{
Console.Write(" \a");
Thread.Sleep(10 00);
}
}
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.Threadin g;
class Timer
{
static void Main()
{
Console.Write(" Enter the number of minutes to wait: ");
int iTime = Int32.Parse(Con sole.ReadLine() );
for (int i = iDelay; i > 0; i--)
{
Console.WriteLi ne("{0} minute(s) remaining.", i);
Thread.Sleep(60 000);
}
Console.Write(" {0} minutes have elapsed", iTime);
for (int i = 3; i > 0; i--)
{
Console.Write(" \a");
Thread.Sleep(10 00);
}
}
Comment