C语言for 循环 9*9 实现九九乘法表

#include <stdio.h>

int main(void)
{
	//for循环实现9*9乘法表
	/*
	1*1=1
	1*2=2 2*2=4
	1*3=3 2*3=6 3*3=9
	*/
	int temp,i,j;
	
	for(i=1; i<10; i++){
		for(j=1;j<=i;j++){
			temp = j*i; //
			if(temp<10){
				printf("%d*%d= %d ",j,i,temp);
			}else{
				printf("%d*%d=%d ",j,i,temp);	
			}			
		}
		printf("
");
	}
	return 0;
}

  

原文地址:https://www.cnblogs.com/wanglijun/p/8470105.html