Lucian_Adrian

Untitled

Aug 4th, 2021
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int a;
  6. cin >> a ;
  7. if (a<= 15)
  8. cout << a*a;
  9. else if(a>=16 && a<=30)
  10. cout << (a/10)+(a%10);
  11. else
  12. cout << (a/10)*(a%10);
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment