Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Thelw 3 arithmous");
- int a1, a2, a3;
- Console.WriteLine("Dwse arithmo 1");
- a1 = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Dwse arithmo 2");
- pame2:
- a2 = Convert.ToInt32(Console.ReadLine());
- if (a1 == a2)
- {
- Console.WriteLine("Dwse allo arithmo");
- goto pame2;
- }
- Console.WriteLine("Dwse arithmo 3");
- pame3:
- a3 = Convert.ToInt32(Console.ReadLine());
- if (a3 == a1 || a3 == a2)
- {
- Console.WriteLine("Dwse allo arithmo");
- goto pame3;
- }
- if (a1 > a2 && a1 > a3)
- {
- Console.WriteLine("O megalyteros arithmos einai o " + a1);
- }
- else if (a2> a1 && a2 > a3)
- {
- Console.WriteLine("O megalyteros arithmos einai o " + a2);
- }
- else if (a3 > a1 && a3 > a2)
- {
- Console.WriteLine("O megalyteros arithmos einai o " + a3);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement