include stdio include stdlib int main void int max do printf scanf pri

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int A, B, max, i;
do
{
printf("A=");
scanf("%d", &A);
printf("B=");
scanf("%d", &B);
} while (A<0 || B<0);
max=(A>B)?A:B;
for(i=max,max=0;i>1;i--)
{
if (!(A%i || B%i))
{
printf("Niet\n");
return 0;
}
}
printf("×èñëà A è B ÿâëÿþòñÿ âçàèìíî ïðîñòûìè\n");
system("PAUSE");
return 0;
}