做乘法

来源:互联网 发布:淘宝平面 编辑:程序博客网 时间:2024/04/27 20:31

做乘法

Time Limit: 1000MS Memory Limit: 65536KB

Submit Statistic

Problem Description

请用C语言编写一个程序。此程序接收一个正整数N,然后打印输出“N次N*(1->N)格式”的数据。例如:此程序接收正整数5,那会输出以下格式的数据:
5*1=5
5*2=10
5*3=15
5*4=20
5*5=25

Input

只有一个正整数N(N<=100)。

Output

输出共N行数据,如上面的例子所示。

Example Input

5

Example Output

5*1=5
5*2=10
5*3=15
5*4=20
5*5=25

Hint

Author

#include <stdio.h>#include <stdlib.h>#include <math.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;}
原创粉丝点击