当前位置:网站首页>99 multiplication table (C language)

99 multiplication table (C language)

2022-07-05 08:16:00 chen_ bx

c Language implementation of 99 multiplication table

The code is as follows :

#include "stdio.h"
int main()
{
    
	int i, j;
	int n = 9;
	for (i = 1; i <= n; i++) {
    
		for (j = 1; j <= i; j++) {
    
			printf("%d*%d=%d", j, i, i*j);
			if (i*j < 10) {
    
				printf(" ");
			}
			else {
    
				printf(" ");
			}
		}
		printf("\n");
	}
	return 0;
}

Running results :
 Insert picture description here

原网站

版权声明
本文为[chen_ bx]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140545026430.html