my modified timer program

  • Thread starter Thread starter John Salerno
  • Start date Start date
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);
}
}
 
Vijaye said:
So, what's iDelay? And what exactly is the use of this application?

Sorry, iDelay should be iTime. The point of the program is just for me
to experiment with writing code a little, but it's also a little alarm I
wanted to make.
 
Back
Top