Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Khisby Al Ghofari, 06.2017.1.06852, Kelas B
- #include <iostream>
- using namespace std;
- int main()
- {
- int x,y;
- string quadrant;
- cout << "\n=========================================\n";
- cout << "Welcome To \n";
- cout << "Application Quadrant Coordinates Cartesian\n";
- cout << "===========================================\n \n";
- cout << "Input the value coordinates X : ";
- cin >> x;
- cout << "Input the value coordinates Y : ";
- cin >> y;
- if(x > 0 && y > 0 ){
- quadrant = "First";
- }else if(x < 0 && y > 0 ){
- quadrant = "Two";
- }else if(x < 0 && y < 0 ){
- quadrant = "Three";
- }else if(x > 0 && y < 0 ){
- quadrant = "Four";
- }else if(x == 0 & y == 0){
- cout << "Coordinates point at origin";
- return 0;
- }
- cout << "Coordinates poin in " << quadrant << " quadrant";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement