/*ques.1. given a point (x,y), write a program to find
out if it lies on the x axis, y axis or on the origin*/
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
int x, y;
printf("enter the value of x:\n");
scanf("%d",&x);
printf("Enter the value of y:\n");
scanf("%d",&y);
if(x==0)
printf("value is on y axis\n");
else
{
if(y==0)
printf("value is on x axis:\n");
else
{
if(x,y=0)
printf("point is on origin:\n");
else
printf("your point is on graph:\n");
}
}
getch();
return 0;
}
out if it lies on the x axis, y axis or on the origin*/
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
int x, y;
printf("enter the value of x:\n");
scanf("%d",&x);
printf("Enter the value of y:\n");
scanf("%d",&y);
if(x==0)
printf("value is on y axis\n");
else
{
if(y==0)
printf("value is on x axis:\n");
else
{
if(x,y=0)
printf("point is on origin:\n");
else
printf("your point is on graph:\n");
}
}
getch();
return 0;
}
by luv yadav
No comments:
Post a Comment