SHOW:
|
|
- or go back to the newest paste.
| 1 | using System; | |
| 2 | ||
| 3 | namespace ConsoleApp2 | |
| 4 | {
| |
| 5 | class Program | |
| 6 | {
| |
| 7 | static void Main(string[] args) | |
| 8 | {
| |
| 9 | Console.WriteLine("Thelw 3 arithmous");
| |
| 10 | int a1, a2, a3; | |
| 11 | ||
| 12 | Console.WriteLine("Dwse arithmo 1");
| |
| 13 | a1 = Convert.ToInt32(Console.ReadLine()); | |
| 14 | ||
| 15 | Console.WriteLine("Dwse arithmo 2");
| |
| 16 | pame2: | |
| 17 | a2 = Convert.ToInt32(Console.ReadLine()); | |
| 18 | ||
| 19 | if (a1 == a2) | |
| 20 | {
| |
| 21 | Console.WriteLine("Dwse allo arithmo");
| |
| 22 | goto pame2; | |
| 23 | } | |
| 24 | ||
| 25 | Console.WriteLine("Dwse arithmo 3");
| |
| 26 | pame3: | |
| 27 | a3 = Convert.ToInt32(Console.ReadLine()); | |
| 28 | ||
| 29 | if (a3 == a1 || a3 == a2) | |
| 30 | {
| |
| 31 | Console.WriteLine("Dwse allo arithmo");
| |
| 32 | goto pame3; | |
| 33 | } | |
| 34 | ||
| 35 | if (a1 > a2 && a1 > a3) | |
| 36 | {
| |
| 37 | Console.WriteLine("O megalyteros arithmos einai o " + a1);
| |
| 38 | } | |
| 39 | else if (a2> a1 && a2 > a3) | |
| 40 | {
| |
| 41 | Console.WriteLine("O megalyteros arithmos einai o " + a2);
| |
| 42 | } | |
| 43 | else if (a3 > a1 && a3 > a2) | |
| 44 | {
| |
| 45 | Console.WriteLine("O megalyteros arithmos einai o " + a3);
| |
| 46 | } | |
| 47 | ||
| 48 | } | |
| 49 | } | |
| 50 | } |