using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_90
{
class Program
{
static void Main(string[] args)
{
int a,i,j, b;
do
{
Console.Write("nhap a="); a = int.Parse(Console.ReadLine());
Console.Write("nhap b="); b = int.Parse(Console.ReadLine());
} while (a < 0 || b < 0);
for (i = 1; i < a; i++)
for (j = 1; j < b; j++)
if (a % i == 0 && b % j == 0&&i==j)
Console.Write(i + "\n");
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_90
{
class Program
{
static void Main(string[] args)
{
int a,i,j, b;
do
{
Console.Write("nhap a="); a = int.Parse(Console.ReadLine());
Console.Write("nhap b="); b = int.Parse(Console.ReadLine());
} while (a < 0 || b < 0);
for (i = 1; i < a; i++)
for (j = 1; j < b; j++)
if (a % i == 0 && b % j == 0&&i==j)
Console.Write(i + "\n");
Console.ReadKey();
}
}
}