Advertisement
kristiankaradjov

Samostoqtelna

Oct 17th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. // ProgramiraneSamostoqtelna.cpp : main project file.
  2.  
  3. #include "stdafx.h"
  4. #include <iostream>
  5. using namespace System;
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     int x; int y;
  11.     cout<<"Enter the first integer: ";
  12.     cin>>x;
  13.     cout<<"Enter the second integer: ";
  14.     cin>>y;
  15.     if(x > 0 && y>0)
  16.     {
  17.         cout<<"It belongs to quadrant 1"<<endl;
  18.     }
  19.     else if(x>0 && y<0)
  20.     {
  21.         cout<<"It belongs to quadrant 4"<<endl;
  22.     }
  23.     else if(x<0 && y>0)
  24.     {
  25.         cout<<"It belongs to quadrant 2"<<endl;
  26.     }
  27.     else if(x<0 && y<0)
  28.     {
  29.         cout<<"It belongs to quadrant 3"<<endl;
  30.     }
  31.     else
  32.     {
  33.         cout<<"Invalid input"<<endl;
  34.     }
  35.    
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement