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