Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int main(){
  7. int n;
  8. cin >> n;
  9. if (n==1){
  10. cout << 0;
  11. return 0;
  12. }
  13. if (n%2==0)
  14. cout << n/2;
  15. else
  16. cout << n;
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement