alex326

Untitled

Jan 28th, 2018
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. problema 451
  2.  
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. {
  7. int n;
  8. cin>>n;
  9. if (n<=15)
  10. cout<<n*n;
  11. else
  12. if ((n>=16) and (n<=30))
  13. cout<<(n%10)+(n/10);
  14. else
  15. cout<<(n%10)*(n/10);
  16. return 0;
  17. }
Add Comment
Please, Sign In to add comment