Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<clocale>
- #include<cstddef>
- using namespace std;
- int main(){
- setlocale(LC_ALL,"rus");
- int x,y;
- cout<< "Введите X: ";//Просим ввести x.
- cin>>x;
- cout<<"Введите Y: ";//Просим ввести y.
- cin>>y;
- int i; //Переменная, номер квадранта.(наш ответ).}
- if (x > 0) {
- if (y > 0) {
- i = 1;
- } else {
- i = 4;
- }
- } else {
- if (y > 0) {
- i = 2;
- } else {
- i = 3;
- }
- }
- return i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement