Write a program to read three integer values from the keyboard and displays the output stating that they are the sides of right-angled triangle.
#include <stdio.h>
void main()
{
int x,y,z;
clrscr();
input:
printf("Enter three values which is equal to 180:");
scanf("%d %d %d",&x,&y,&z);
if(x+y+z!=180)
goto input;
else
if(x==90||y==90||z==90)
printf("This is Right angled triangle!");
elseprintf("It is not Right angled triangle!");
getch();
}
No comments:
Post a Comment