package proje.kullanicidanalinan2sayininebobunubulma;

import java.util.Scanner;

public class ProjeKullanicidanAlinan2SayininEbobunuBulma {
public static int ebobBulma(int a, int b){
    int ebob = 1;
    for (int i = 1;i<=a && i<=b;i++)
    {
        if ((a%i==0) && (b%i==0)){
            ebob = i;
        }
    }
    return ebob;
}
public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    System.out.println("1. Sayi = ");
    int birincisayi = scanner.nextInt();
    System.out.println("2. Sayi = ");
    int ikincisayi = scanner.nextInt();
    System.out.println("Iki sayinin ebobu = " + ebobBulma(birincisayi, ikincisayi));
}

}