本文介绍了许多数字的因子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用户需要在新行中输入整数,直到他输入负整数,我们需要找到用户输入的每个数字的阶乘,但负数除外。请帮忙!
User needs to enter integers in new line until he enters a negative integer , we need to find the factorial of every number entered by the user except for the negative one. Please help!
推荐答案
while(n>0){
//ask the user to enter the number for finding factorial
//n is the number to be entered by the user for finding factorial.
}
这篇关于许多数字的因子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!