Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int max(int a, int b) {
- return a > b;
- }
- int main() {
- float N, M;
- cin >> N >> M;
- float med = (N + M) / 2 + 1;
- int dif = max(N - M, M - N);
- for (int i = med - dif / 2; i <= med + (dif + 1) / 2; ++i) {
- cout << i << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement