Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int nom(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 {
- return 4;
- }
- }
- int main() {
- int x, y;
- cout << "(X): ";
- cin >> x;
- cout << "(Y): ";
- cin >> y;
- cout << "rez: " << nom(x, y);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment