当前位置:网站首页>Zzuli:1048 factorial table
Zzuli:1048 factorial table
2022-07-03 14:34:00 【Snake_____】
Title Description
Enter a positive integer n(n<=20), Output 1 To n Factorial table between .
Input
Enter only one positive integer n.
Output
Output 1 To n Factorial table between , See the output sample for the format . Two data per row , The first data accounts for 4 Column , The second data accounts for 20 Column , Align left .
The sample input Copy
5
Sample output Copy
1 1 2 2 3 6 4 24 5 120
Tips
Be careful int The representation range of the type
#include <stdio.h>
int main()
{
int n,i;
double num=1;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
num=num*i;
printf("%-4d%-20.0lf\n",i,num);
}
return 0;
}边栏推荐
- Understand the application scenario and implementation mechanism of differential segment
- How Facebook moves instagram from AWS to its own server
- 中感微冲刺科创板:年营收2.4亿净亏1782万 拟募资6亿
- 适用于XP的DDK
- retrofit
- 一文了解微分段应用场景与实现机制
- 7-3 rental (20 points)
- Luogu p5194 [usaco05dec]scales s solution
- Raft agreement
- Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
猜你喜欢

泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东

Eight sorts

Why is this error reported when modifying records in the database

npm install卡住与node-npy的各种奇怪报错

Doris学习笔记之数据表的创建

Tiantu investment sprint Hong Kong stocks: asset management scale of 24.9 billion, invested in xiaohongshu and Naixue

NPM install is stuck with various strange errors of node NPY

Detailed explanation of four modes of distributed transaction (Seata)

x86汇编语言-从实模式到保护模式 笔记

puzzle(016.3)千丝万缕
随机推荐
Luogu p3065 [usaco12dec]first! G problem solution
fpga阻塞赋值和非阻塞赋值
洛谷P5536 【XR-3】核心城市 题解
Analysis of gene family characteristics - chromosome location analysis
C language,%d% Difference between 2D%2d%02d
Creation of data table of Doris' learning notes
dllexport和dllimport
Happy capital new dual currency fund nearly 4billion yuan completed its first account closing
tonybot 人形机器人 查看端口并对应端口 0701
Common commands for getting started with mongodb database
SSH访问控制,多次失败登录即封掉IP,防止暴力破解
Sub GHz wireless solution Z-Wave 800 Series zg23 SOC and zgm230s modules
泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
protobuf与grpc
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
7-9 one way in, two ways out (25 points)
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
Sendmail无法发送邮件及发送过慢解决
洛谷P3065 [USACO12DEC]First! G 题解
Puzzle (016.4) domino effect