| 3 | using namespace std; |
| 4 | |
| 5 | int main(){ |
| 6 | int n; |
| 7 | cin>>n; |
| 8 | int ans = 1; |
| 9 | for(int i=1;i<=n;i++){ |
| 10 | ans = ans * i; |
| 11 | } |
| 12 | cout<<"factorial of "<<n<<" is "<<ans<<endl; |
| 13 | |
| 14 | cin>>n; |
| 15 | ans = 1; |
| 16 | for(int i=1;i<=n;i++){ |
| 17 | ans = ans * i; |
| 18 | } |
| 19 | cout<<"factorial of "<<n<<" is "<<ans<<endl; |
| 20 | |
| 21 | cin>>n; |
| 22 | ans = 1; |
| 23 | for(int i=1;i<=n;i++){ |
| 24 | ans = ans * i; |
| 25 | } |
| 26 | cout<<"factorial of "<<n<<" is "<<ans<<endl; |
| 27 | } |
nothing calls this directly
no outgoing calls
no test coverage detected