SelinD

ex95

Apr 9th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include<iomanip>
  2. #include<cmath>
  3. #include<iostream>
  4. using namespace std;
  5. int main()
  6. {
  7. int n,fact=1;
  8. cin>>n;
  9. while(fact<n)
  10. {
  11. fact=fact*n;
  12. fact++;
  13. }
  14. if(n==fact) cout<<" da"<<" "<<fact-1;
  15. else cout<"nu";
  16.  
  17. }
Add Comment
Please, Sign In to add comment