public static void main(String[] args)
{
int a,b,i,max,min,Ebob=1,Ekok=1;
Scanner Klavye = new Scanner(System.in);
System.out.println("EBOB ve EKOK hesabı");
System.out.print("İlk değeri giriniz = ");
a = Klavye.nextInt();
System.out.print("İkinci değeri giriniz = ");
b = Klavye.nextInt();
max = (a>b) ? a:b;
min = (a>b) ? b:a;
for(i=max;i>=min;i--)
{
if((min%i==0)&&(max%i==0))
{
Ebob = Ebob * i;
}
Ekok = (a*b)/Ebob;
}
System.out.println("EBOB = "+Ebob+" EKOK = "+Ekok+"\n");
}
eyw tam aradığım kod
Emeğine sağlık çok işime yaradı.
I’m not sure where you are getting your info, but great topic.
I needs to spend some time learning more or understanding
more. Thanks for fantastic information I was looking for this information for my mission.