Rozwiązanie:
#include <iostream>
using namespace std;
int numer_cwiartki(int x, int y)
{
if (x > 0 && y > 0) return 1;
else if (x < 0 && y > 0) return 2;
else if (x < 0 && y < 0) return 3;
else if (x > 0 && y < 0) return 4;
else if (x == 0 || y == 0) return 0;
}
void parzyste(int x, int y)
{
while (x != y)
{
if (x % 2 == 0) cout << x << endl;
if (x < y) x++;
else x--;
}
}
double wyrazenie(int x, int y)
{
return 5.0 / (x - y + 2.0);
}
int main()
{
int x, y;
cout << "Podaj x: "; cin >> x;
cout << "Podaj y: "; cin >> y;
if (numer_cwiartki(x, y) == 1) parzyste(x, y);
else if (numer_cwiartki(x, y) == 2 || numer_cwiartki(x, y) == 4) cout << wyrazenie(x, y);
else if (numer_cwiartki(x, y) == 0 || numer_cwiartki(x, y) == 3) cout << "Koniec programu";
return 0;
}