当前位置:网站首页>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
- Tonybot humanoid robot starts for the first time 0630
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
- MongoDB索引
- retrofit
- 7-15 calculation of PI
- NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
- Why is this error reported when modifying records in the database
- npm install卡住与node-npy的各种奇怪报错
猜你喜欢

NPM install is stuck with various strange errors of node NPY

Protobuf and grpc

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

Mysql多表查询 #子查询

retrofit

Happy capital new dual currency fund nearly 4billion yuan completed its first account closing

修改数据库中的记录为什么报这个错

US stock listing of polar: how can the delivery of 55000 units support the valuation of more than 20billion US dollars

Puzzle (016.3) is inextricably linked

Tonybot humanoid robot starts for the first time 0630
随机推荐
7-10 stack of hats (25 points) (C language solution)
Luogu p3065 [usaco12dec]first! G problem solution
Tonybot humanoid robot starts for the first time 0630
PCB中常用快捷键
Some concepts about agile
x86汇编语言-从实模式到保护模式 笔记
关于敏捷的一些概念
洛谷P3065 [USACO12DEC]First! G 题解
Common commands for getting started with mongodb database
etcd集群权限管理和账号密码使用
亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块
ConstraintLayout 的使用
npm install卡住与node-npy的各种奇怪报错
7-3 rental (20 points)
Convert string to decimal integer
超简单手机地图开发
Protobuf and grpc
556. The next larger element III
C language,%d% Difference between 2D%2d%02d