版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
Problem Description
请用C语言编写一个程序。此程序接收一个正整数N,然后打印输出“N次N*(1->N)格式”的数据。例如:此程序接收正整数5,那会输出以下格式的数据:
51=5
52=10
53=15
54=20
5*5=25
Input
只有一个正整数N(N<=100)。
Output
输出共N行数据,如上面的例子所示。
Sample Input
5
Sample Output
51=5
52=10
53=15
54=20
5*5=25
Hint
Source
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n,i;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("%d*%d=%d\n",n,i,n*i);
}
return 0;
}