Recent Posts

9-latest-250px-course

Write a C program to find the quadrant in which the given coordinates lie

Write a C program to find the quadrant in which the given coordinates lie



Program:-     

#include <stdio.h>
int main()
{
//Fill the code
int a,b;
scanf(“%d %d”,&a,&b);
if(a > 0 && b > 0)
printf(“Ist Quadrant”);
else if(a < 0 && b > 0)
printf(“IInd Quadrant”);
else if(a < 0 && b < 0)
printf(“IIIrd Quadrant”);
else if(a > 0 && b < 0)
printf(“IVth Quadrant”);
else
printf(“Origin”);
return 0;
}

Output:-

....
SHARE

Milan Tomic

Hi. I’m Designer of Blog Magic. I’m CEO/Founder of ThemeXpose. I’m Creative Art Director, Web Designer, UI/UX Designer, Interaction Designer, Industrial Designer, Web Developer, Business Enthusiast, StartUp Enthusiast, Speaker, Writer and Photographer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment