fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int num;
  7. int i;
  8.  
  9. i=0;
  10. num=0;
  11.  
  12. cout<<"Inserire un numero intero"<<endl;
  13. cin>>num;
  14.  
  15. for(i=num; i>0; i=i-1)
  16. {
  17. num=num*i;
  18. }
  19.  
  20. cout<<"Il suo numero fattoriale e' "<<num<<endl;
  21.  
  22. system("PAUSE");
  23. return 0;
  24. }
Success #stdin #stdout #stderr 0.01s 5388KB
stdin
5
stdout
Inserire un numero intero
Il suo numero fattoriale e' 600
stderr
sh: 1: PAUSE: not found