#include<stdio.h>
#include<conio.h>
void main()
{
int x,y;
printf("Enter the X co-ordinate of the point: ");
scanf("%d",&x);
printf("Enter the Y co-ordinate of the point: ");
scanf("%d",&y);
if(x==0 && y==0)
printf("\nPoint lies at the origin.");
else if(x==0)
printf("\nPoint lies on the y-axis.");
else if(y==0)
printf("\nPoint lies on the x-axis.");
else
printf("\nPoint does not lie on any axis.");
getch();
}
#include<conio.h>
void main()
{
int x,y;
printf("Enter the X co-ordinate of the point: ");
scanf("%d",&x);
printf("Enter the Y co-ordinate of the point: ");
scanf("%d",&y);
if(x==0 && y==0)
printf("\nPoint lies at the origin.");
else if(x==0)
printf("\nPoint lies on the y-axis.");
else if(y==0)
printf("\nPoint lies on the x-axis.");
else
printf("\nPoint does not lie on any axis.");
getch();
}
No comments:
Post a Comment