fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace guess_the_number
  7. {
  8. class MainClass
  9. {
  10. private Random random = new Random();
  11.  
  12. int getRandomNumber()
  13. {
  14. return random.Next(1, 100);
  15. }
  16.  
  17.  
  18.  
  19. static void Main(string[] args)
  20. {
  21. MainClass main = new MainClass();
  22.  
  23. Console.Write("~~~Guess-The-Number~~~\n\n\n");
  24. //
  25. //
  26. Console.Write("Instructions:\n\n\n");
  27. //
  28. //
  29. Console.Write("You will attempt to guess a number, 1-100.\n");
  30.  
  31.  
  32. for (int i = 0; i < 100; ++i)
  33. Console.WriteLine(main.getRandomNumber());
  34.  
  35. Console.Read();
  36.  
  37. }
  38. }
  39. }
  40.  
Success #stdin #stdout 0.03s 33864KB
stdin
Standard input is empty
stdout
~~~Guess-The-Number~~~


Instructions:


You will attempt to guess a number, 1-100.
93
24
18
61
47
33
66
14
79
86
15
87
43
57
1
70
91
36
87
85
54
29
10
54
12
97
20
23
1
70
87
2
23
28
33
89
85
28
89
36
92
65
5
20
25
28
9
15
85
6
64
68
9
71
56
91
2
90
28
58
48
39
24
44
94
50
83
24
33
73
62
76
51
82
21
86
21
38
98
20
95
30
94
43
22
48
78
78
34
83
7
61
95
17
74
17
14
22
99
39