▲C语言实现乘法口诀表的输出
①正三角输出
#include<stdio.h>int main(){int i, j = 0;for (i = 1; i <= 9; i++){for (j = 1; j <=i; j++){printf("%d*%d=%2d\t", i, j, i*j);}printf("\n");}return 0;
②倒三角输出乘法口诀表
#include<stdio.h>int main(){int i, j = 0;for (i = 1; i <= 9; i++){for (j = i; j <=9; j++){printf("%d*%d=%2d\t", i, j, i*j);}printf("\n");}return 0;
③矩阵形式输出
#include<stdio.h>int main(){int i, j = 0;for (i = 1; i <= 9; i++){for (j = 1; j <=9; j++){printf("%d*%d=%2d\t", i, j, i*j);}printf("\n");}return 0;