#include<stdio.h>
#include<conio.h>
main()
{
int x,y,z,sum=0;
clrscr();
printf("\n enter the angles x,y and z");
scanf("\n %d%d%d",&x,&y,&z);
sum=x+y+z;
if(sum==180)
{
printf("\n triangle is valid sum=%d",sum);
}
else
{
printf("\n triangle is not valid sum=%d",sum);
}
return (0);
}
output:-
enter value of x=50
enter value of y=60
enter value of z=70
triangle is valid sum=180