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.

38 lines
575 B

/*
* Multiplikationstabelle mit while-Schleife
*
* by Rainer Hihn
*/
#include <stdio.h>
int main(void) {
/*
* vertical and horizontal limit
*/
int hlimit;
int vlimit;
scanf("%d", &hlimit);
scanf("%d", &vlimit);
/*
* while loop vars
*/
int i = 1;
int j = 1;
while(i <= vlimit) {
while(j <= hlimit) {
printf("%d\t", i*j);
j++;
}
j = 1;
i++;
printf("\n");
}
printf("\n");
return 0;
}