A simple for loop nested case
The only thing to note is: the value of j in the inner for loop must change with the value of i
#include<stdio.h>
int main() {
// for循环嵌套实现乘法表
for(int i=1;i<=9;i++){
for(int j=1;j<=i;j++){
printf("%d*%d=%d\t",i,j,i*j);
}
printf("\n");
}
return 0;
}