Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iomanip>
- #include<cmath>
- #include<iostream>
- using namespace std;
- int main()
- {
- int n,fact=1;
- cin>>n;
- while(fact<n)
- {
- fact=fact*n;
- fact++;
- }
- if(n==fact) cout<<" da"<<" "<<fact-1;
- else cout<"nu";
- }
Add Comment
Please, Sign In to add comment