-->

Write a program to know a triangle is right angled or not

//a program to know a triangle is right angled or not
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z;                          // x,y z are angles
printf("enter 3 angles\n");
scanf("%d%d%d",&x,&y,&z);
if(x==90 || y==90 || z==90)
{
printf("it is right angled triangle");
}

else
{
printf("it is not");
}
getch();
}

No comments:

Post a Comment