博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
sql求阶乘_PL / SQL程序查找数字的阶乘
阅读量:2511 次
发布时间:2019-05-11

本文共 641 字,大约阅读时间需要 2 分钟。

sql求阶乘

Here you will get pl/sql program to find factorial of a number.

在这里,您将获得pl / sql程序来查找数字的阶乘。

We can calculate factorial of a number by multiplying it with all the numbers below it.

我们可以通过将数字乘以其下所有数字来计算阶乘。

For example factorial of 5 = 5 x 4 x 3 x 2 x 1 = 120.

例如5的阶乘= 5 x 4 x 3 x 2 x 1 = 120。

PL / SQL程序查找数字的阶乘 (PL/SQL Program to Find Factorial of a Number)

declare	n number;	fac number:=1;	i number; begin	n:=&n; 	for i in 1..n	loop		fac:=fac*i;	end loop; 	dbms_output.put_line('factorial='||fac);end;/

Output

输出量

Enter value for n: 10 old 7: n:=&n; new 7: n:=10; factorial=3628800

输入n的值:10 旧7:n:=&n; 新7:n:= 10; 阶乘= 3628800

翻译自:

sql求阶乘

转载地址:http://cgggb.baihongyu.com/

你可能感兴趣的文章
[原][osg][osgEarth]osg::Matrix 父子节点的变化关系
查看>>
[设计模式]适配器模式Adapter
查看>>
【题解】Atcoder AGC#01 E-BBQ Hard
查看>>
读书笔记系列之——《把时间当做朋友》
查看>>
zookeeper 选举和同步
查看>>
第五章上机实践报告
查看>>
java 线程管理Executors
查看>>
C#0010--窗体中的滚动字幕
查看>>
一步步学习SPD2010--第十章节--SP网站品牌化(3)--在内容页中识别样式
查看>>
[转]Android中用Java获取时间实例
查看>>
XAMPP下载,安装及其配置
查看>>
熟悉常用的HBase操作
查看>>
IOS银行卡合法性校验
查看>>
Android-Lopper类的介绍(Handler背后的类)
查看>>
Unity3D 物体跟随鼠标旋转
查看>>
内存映射与DMA笔记
查看>>
贴片电阻简介:功率大小与尺寸对应表
查看>>
AdjustTokenPrivileges启用权限
查看>>
C++静态库与动态库
查看>>
eval函数与showModalDialog的结合使用
查看>>