C Dersi: OBEB Kodu - OBEB Bulan Program Kodları..
Kod:
#include <stdio.h>
#include <conio.h>
int okek(int number1, int number2);
int main()
{
int x, y;
int n = 5;
while (n--) {
printf("iki tamsayı giriniz : ");
scanf("%d%d", &x, &y);
printf("okek = %d\n", okek(x, y));
}
getch();
return 0;
}
int okek(int number1, int number2)
{
int i;
int max = (number1 > number2) ? number1 : number2;
for (i = max; i <= number1 * number2; i += max)
if (i % number1 == 0 && i % number2 == 0)
return i;
}