7.5
#include <iostream> using namespace std; long jiecheng(int); void main75() { cout<<"Please enter the number:"; int n; while(cin>>n) { long result=jiecheng(n); cout<<"the result of jiecheng "<<n<<"! = "<<result<<endl; cout<<"Please enter the number :"; } system("pause"); } long jiecheng(int n) { if(n==0) return 1; else return n=n*jiecheng(n-1); }
——————————————————————————————————————————————————
//写的错误或者不好的地方请多多指导,可以在下面留言或者给我发邮件,指出我的错误以及不足,以便我修改,更好的分享给大家,谢谢。
转载请注明出处:https://www.royalchen.com/
author:royalchen
Email:royalchen@royalchen.com
———————————————————————————————————————————————————