Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. if (x > y) {
  2. int temp = 0;
  3. if (x % 2 == 0)
  4. {
  5. temp = x / 2;
  6. sum += temp + temp / 2 - 1;
  7. }
  8. else if (x % 2 == 1) {
  9. temp = x / 2 + 1;
  10. sum += temp + temp / 2 - 1;
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement