my/c/l5.c
2026-05-07 19:48:06 +03:00

28 lines
No EOL
521 B
C

#include <stdio.h>
int main() {
int pol;
printf("Enter number ");
scanf("%d", &pol);
if(pol > 9) {
printf("Error: number must be from 1 to 9\n");
return 0;
}
else if(pol < 1) {
printf("Error: number must be from 1 to 9\n");
return 0;
}
int x = 1;
int s = 0;
while(1) {
printf("%d * %d = %d\n", pol, x, pol*x);
x++;
s++;
if(s < 10) {
continue;
}
else {
break;
}
}
}