当前位置:网站首页>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;
}
边栏推荐
- Detailed explanation of four modes of distributed transaction (Seata)
- adc128s022 ADC verilog设计实现
- Luogu p5194 [usaco05dec]scales s solution
- Table of mathematical constants by q779
- 【7.3】146. LRU缓存机制
- Accelerating strategy learning using parallel differentiable simulation
- Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
- 洛谷P5194 [USACO05DEC]Scales S 题解
- Concat and concat_ Ws() differences and groups_ Use of concat() and repeat() functions
- Pyqt interface production (login + jump page)
猜你喜欢
7-15 calculation of PI
提高效率 Or 增加成本,开发人员应如何理解结对编程?
Understanding of closures
剑指 Offer 28. 对称的二叉树
论文分享:Generating Playful Palettes from Images
7-18 finding the single root of polynomial by dichotomy
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
Understand the application scenario and implementation mechanism of differential segment
NPM install is stuck with various strange errors of node NPY
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
随机推荐
Pyqt interface production (login + jump page)
【7.3】146. LRU缓存机制
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
Time conversion ()
泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
2021年区域赛ICPC沈阳站J-Luggage Lock(代码简洁)
Bibit pharmaceutical rushed to the scientific innovation board: annual revenue of 970000, loss of 137million, proposed to raise 2billion
tonybot 人形机器人 红外遥控玩法 0630
tonybot 人形机器人 查看端口并对应端口 0701
Tonybot humanoid robot infrared remote control play 0630
String sort
洛谷P4047 [JSOI2010]部落划分 题解
Tonybot humanoid robot checks the port and corresponds to port 0701
Luogu p5194 [usaco05dec]scales s solution
Recent learning summary
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
洛谷P5536 【XR-3】核心城市 题解
J-luggage lock of ICPC Shenyang station in 2021 regional games (simple code)
Selective sorting
x86汇编语言-从实模式到保护模式 笔记