无需输入,直接输出九九乘法表,特别简单。
运行结果如下:
#include<stdio.h> int main() { int a = 1; int b = 1; int i = 0, j = 0; for (a=1; i < 9; i++,b++) { for (a=1,j = 0; j < b; j++) { printf("%d*%d=%d ", a, b, a * b); a++; } printf("\n"); } return 0; }
原文:https://www.cnblogs.com/fixed-stars/p/12571426.html