当前位置:网站首页>2020-12-20 99 multiplication table

2020-12-20 99 multiplication table

2022-07-27 00:35:00 Deep dream, high ambition, floating life like a dream

multiplication table
Tan Haoqiang c Language Redbook
Observe the output to write code
The outer for You can control the output of several lines .
The inner layer of the for You can control the output of each line .

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

}

 This is the output

When we change the circulation conditions of the inner circulation The following results are obtained I always thought this was the 99 multiplication table

 When we changed the circulation condition of the inner circle, I always thought this was the 99 multiplication table

原网站

版权声明
本文为[Deep dream, high ambition, floating life like a dream]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207262237027653.html