#include <stdio.h>
void main()
{
int a, b;
printf("Enter a value of a: ");
scanf("%d", &a);
printf("Enter a value of b: ");
scanf("%d", &b);
if (a == 0 && b == 0)
{
printf("%d and %d lies in origin point.", a, b);
}
else if (a > 0 && b > 0)
{
printf(" %d and %d are in first quadrant.", a, b);
}
else if (a < 0 && b > 0)
{
printf(" %d and %d are in second quadrant.", a, b);
}
else if (a < 0 && b < 0)
{
printf(" %d and %d are in third quadrant.", a, b);
}
else if (a > 0 && b < 0)
{
printf(" %d and %d are in fourth quadrant", a, b);
}
else
{
printf("program execute!");
}
}
OUTPUT
Enter a value of a: 5
Enter a value of b: 8
5 and 8 are in the first quadrant.
0 Comments