Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ProgramiraneSamostoqtelna.cpp : main project file.
- #include "stdafx.h"
- #include <iostream>
- using namespace System;
- using namespace std;
- int main()
- {
- int x; int y;
- cout<<"Enter the first integer: ";
- cin>>x;
- cout<<"Enter the second integer: ";
- cin>>y;
- if(x > 0 && y>0)
- {
- cout<<"It belongs to quadrant 1"<<endl;
- }
- else if(x>0 && y<0)
- {
- cout<<"It belongs to quadrant 4"<<endl;
- }
- else if(x<0 && y>0)
- {
- cout<<"It belongs to quadrant 2"<<endl;
- }
- else if(x<0 && y<0)
- {
- cout<<"It belongs to quadrant 3"<<endl;
- }
- else
- {
- cout<<"Invalid input"<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement