#include <stdio.h>
#include <conio.h>
void main()
{
int a, b, c, sum;
printf("Enter a first angle: ");
scanf("%d", &a);
printf("Enter a second angle: ");
scanf("%d", &b);
printf("Enter a third angle: ");
scanf("%d", &c);
sum = a+b+c;
if(sum == 180)
{
printf("Triangle can form.");
}
else
{
printf("Triangle cant be formed with given angles.");
}
getch();
}
Enter a first angle: 60
Enter a second angle: 45
Enter a third angle: 60
Triangle cant is formed.
0 Comments