Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int m, n;
- Console.WriteLine("Input m");
- m = Int32.Parse(Console.ReadLine());
- Console.WriteLine("Input n");
- n = Int32.Parse(Console.ReadLine());
- System.Diagnostics.Stopwatch swatch = new System.Diagnostics.Stopwatch();
- swatch.Start(); // старт
- while (m != n)
- {
- if (m > n) m = m - n;
- else n = n - m;
- }
- swatch.Stop(); // стоп
- Console.WriteLine(swatch.Elapsed);
- Console.WriteLine("Nod =");
- Console.Write(m);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement