-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1041.cpp
More file actions
43 lines (31 loc) · 648 Bytes
/
1041.cpp
File metadata and controls
43 lines (31 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
double x, y, quadrante;
cout << fixed << setprecision(1);
cin >> x >> y;
if ( x == 0 and y == 0) {
cout << "Origem" << endl;
}
if ( x == 0 and y != 0) {
cout << "Eixo Y" << endl;
}
if ( x != 0 and y == 0) {
cout << "Eixo X" << endl;
}
if ( x > 0 and y > 0) {
cout << "Q1" << endl;
}
if ( x > 0 and y < 0) {
cout << "Q4" << endl;
}
if ( x < 0 and y > 0) {
cout << "Q2" << endl;
}
if ( x < 0 and y < 0) {
cout << "Q3" << endl;
}
return 0;
}