Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main()
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int remain = a % b;
- while (remain != 0)
- {
- a = b;
- b = remain;
- remain = a % b;
- }
- Console.WriteLine(Math.Abs(b));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement