l5.c 521 B

12345678910111213141516171819202122232425262728
  1. #include <stdio.h>
  2. int main() {
  3. int pol;
  4. printf("Enter number ");
  5. scanf("%d", &pol);
  6. if(pol > 9) {
  7. printf("Error: number must be from 1 to 9\n");
  8. return 0;
  9. }
  10. else if(pol < 1) {
  11. printf("Error: number must be from 1 to 9\n");
  12. return 0;
  13. }
  14. int x = 1;
  15. int s = 0;
  16. while(1) {
  17. printf("%d * %d = %d\n", pol, x, pol*x);
  18. x++;
  19. s++;
  20. if(s < 10) {
  21. continue;
  22. }
  23. else {
  24. break;
  25. }
  26. }
  27. }