Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (x > y) {
- int temp = 0;
- if (x % 2 == 0)
- {
- temp = x / 2;
- sum += temp + temp / 2 - 1;
- }
- else if (x % 2 == 1) {
- temp = x / 2 + 1;
- sum += temp + temp / 2 - 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement