#define _crt_secure_no_warnings
#include <stdio.h>
#include <stdlib.h>
void func(int n){
for (int a = 1; a < n + 1; a++){
for (int b = 1; b < n + 1; b++){
if (a < b){
continue;
}
printf("%d*%d=%d\t", b, a, a*b);
}
printf("\n");
}
}
int main(){
int t = 0;
int b = 1;
int a = 1;
printf(“请输入一个整数:”);
scanf("%d", &t);
func(t);
system(“pause”);
return 0;
}
18、.实现一个函数,打印乘法口诀表,口诀表的行数和列数自己指定, 输入9,输出9*9口诀表,输入12,输出12*12的乘法口诀表。
最新推荐文章于 2022-01-04 15:43:26 发布