【C语言】制作九九乘法表

代码:

#include "stdio.h"
int main(){
	
	int x,y;//申请行和列变量

	for(x = 1;x <= 9; x++){//循环行
		
		for(y = 1; y <= x; y++){ // 循环列  列数等于当前行数

			printf("%d*%d=%d\t",y,x,y*x);//输出 注意输出格式

		}

		printf("\n");//不要忘记换行

	}

return 0;
}

结果:

猜你喜欢

转载自blog.csdn.net/u011182346/article/details/83345669