18 lines
268 B
C
18 lines
268 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int f(int a, int b) {
|
|
int i = 0;
|
|
while (!((a % i == 0) && (b % i == 0))) {
|
|
i++;
|
|
}
|
|
return i;
|
|
}
|
|
|
|
int main() {
|
|
int a = 9;
|
|
int b = 73;
|
|
printf("ppcm(%d, %d) = %d\n", a, b, f(a, b));
|
|
exit(0);
|
|
}
|