chore: add quadrant program

main
CrimsonTome 2023-02-05 23:37:05 +00:00 committed by Rowan Clark
parent e7cb70ef5f
commit d0d4756681
No known key found for this signature in database
GPG Key ID: F620D51904044094
1 changed files with 24 additions and 0 deletions

24
quadrant/main.cpp Normal file
View File

@ -0,0 +1,24 @@
#include <iostream>
using namespace std;
int main(){
int x;
cin >> x;
int y;
cin >> y;
if (x>0){
if (y<0){
cout << "4" << endl;
}
else{
cout << "1" << endl;
}
}
else if (y>0){
cout << "2" << endl;
}
else {
cout << "3" << endl;
}
return 0;
}