You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
512 B

  1. /*
  2. * Multiplikationstabelle mit for-Schleife
  3. *
  4. * by Rainer Hihn
  5. */
  6. #include <stdio.h>
  7. int main(void) {
  8. /*
  9. * vertical and horizontal limit
  10. */
  11. int hlimit;
  12. int vlimit;
  13. scanf("%d", &hlimit);
  14. scanf("%d", &vlimit);
  15. /*
  16. * for loop vars
  17. */
  18. int i;
  19. int j;
  20. for(i = 1; i <= vlimit; i++) {
  21. for(j = 1; j <= hlimit; j++) {
  22. printf("%d\t", i*j);
  23. }
  24. printf("\n");
  25. }
  26. printf("\n");
  27. return 0;
  28. }