摘要:
1 #include <iostream> 2 using namespace std; 3 int jc(int n) 4 { 5 int a=1; 6 if (n<0) cout<<"ERROR!"; 7 else if (n==0||n==1) a=1; 8 for(int i=1;i<=n;i++) 9 a=a*i;10 return a;11 }12 13 int main()14 { 15 cout<<jc(-100)<<endl;16 cout<<jc(0)<<endl;17 阅读全文
posted @ 2011-11-20 11:08
贰百舞
阅读(223)
评论(0)
推荐(0)
浙公网安备 33010602011771号