C语言习题:输出乘法口诀表
思路:嵌套循环(双层),格式化输出
#include <stdio.h>
int main() {
// insert code here...
int i = 0;
int j = 0;
for(i = 1; i < 10; i++){
for(j = 1; j <= i; j++)
printf("%d*%d=%d ", i, j, i*j);
printf("\n");
}
return 0;
}
运行结果