Files
oop/labs/lab3/Euclid/Program.cs
2025-09-30 08:21:09 +03:00

30 lines
538 B
C#

using System;
public class Program
{
public static void Main(string[] args)
{
int a, b, temp;
Console.Write("input a:");
a = int.Parse(Console.ReadLine());
Console.Write("input b:");
b = int.Parse(Console.ReadLine());
temp = a;
while (temp != b)
{
a = temp;
if (a < b)
{
temp = a;
a = b;
b = temp;
}
temp = a - b;
a = b;
}
}
}