程序员养成记(第二天)

输出乘法口诀表(C语言程序)
#include<stdio.h>
#include<stdlib.h>
main()
{
int i, j;
for (i = 1; i <= 9; i++) //循环计算1~9
{
for (j = 1; j <= i; j++) //输出数i的i个乘法项
{
printf("%d*%d=%d “, i, j, ij);
}
if (i == 3)printf("\tThis is the 9
9 table.”); //在3的那一行输出This is the 9*9 table.
printf("\n"); //输出换行符

}
system(“pause”);
}

猜你喜欢

转载自blog.csdn.net/beststudent_/article/details/88606940