-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
34 lines (31 loc) · 854 Bytes
/
Program.cs
File metadata and controls
34 lines (31 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace Program
{
class code
{
static void Main(string[] args)
{
Thread threadOne = new Thread(ItUp);
Thread threadTwo = new Thread(ItDown);
threadOne.Start();
threadTwo.Start();
}
static void ItUp()
{
for (int i = 1; i < 11; i++)
{
Console.WriteLine($"Counting up: {i}");
Thread.Sleep(2000);
}
Console.WriteLine("Counting up sequence completed!");
}
static void ItDown()
{
for (int i = 10; i > 0; i--)
{
Console.WriteLine($"Counting down: {i}");
Thread.Sleep(2000);
}
Console.WriteLine("Counting down sequence completed!");
}
}
}