Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int a = Convert.ToInt32(Console.ReadLine());
- int b = Convert.ToInt32(Console.ReadLine());
- a = Math.Max(a, b);
- b = Math.Min(a, b);
- if (a != b)
- {
- while(a > b)
- {
- a = a - b;
- }
- }
- Console.WriteLine(a);
- Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement