Hey everyone. This is my code at the moment:
namespace Experimenting
{
class Program
{
const int maximum = 5;
static int[] myArray = new int[maximum];
static void Main(string[] args)
{
RandomNumbers();
ScreenOutput();
}
static void RandomNumbers()
{
int x = 0;
for (int i = 0; i < maximum; i++)
{
Random numbers = new Random(i);
x = numbers.Next(0,100);
Console.WriteLine(x);
myArray[i] = x;
}
Console.ReadLine();
return;
}
static void ScreenOutput()
{
Console.WriteLine("-------------------------------------");
Console.WriteLine("Here are five numbers. What is the sum of all these numbers?");
Console.ReadLine();
}
}
}
I was wondering if anyone knew how to put a visible timer on the screen that ticks down whilst the user is trying to add up all the numbers? Once the timer finishes I wanted it to display a message or go onto another method. If anyone can help it'l be great. Also, quick question, do you guys use enumerations alot? My book has gone onto learning about these but I can't really grasp the concept of it. Thank you :D