CopyPastehas never been so tasty!

nick1

by anonymous

  • 0
  • 0
  • 0
322 views

#include "stdafx.h"
#include "stdio.h"
#include "conio.h"


int main()
{
    int x,y;
    printf("Input x coordinate:");
    scanf("%d",&x);
    printf("Input y coordinate:");
    scanf("%d",&y);

if ((x > 0) && ( y > 0 ))
{
    printf("It is located in the I quadrant");
}

else if (( x == 0 ) && ( y == 0 ))
{
    printf("It is located in the Origin");
}

else if (( x < 0 ) && ( y > 0 ))
{
    printf("It is located in the II quadrant");
}

else if (( x < 1 ) && ( y < 1 ))
{
    printf("It is located in the III quadrant");
}

else if (( x > 1 ) && ( y < 1 ))
{
    printf("It is located in the IV quadrant");
}
getch();
return 0;
}

Add A Comment: