VALID TRIANGLE
Code :
#include<stdio.h>
int main()
{
int angle1 = 0, sum = 0, angle2 = 0, angle3 = 0;
printf("=========================================\n");
printf("\t TRIANGLE FAMILY\n");
printf("=========================================\n");
printf("Enter angles of Triangle...\n");
printf("Angle 1 : ");
scanf("%d", &angle1);
printf("Angle 2 : ");
scanf("%d", &angle2);
printf("Angle 3 : ");
scanf("%d", &angle3);
printf("\n");
sum = angle1 + angle2 + angle3;
if(sum == 180)
{
printf("Valid Trianle.\n");
}
else
{
printf("Invalid Triangle.\n");
}
printf("-----------------------------------------\n");
return 0;
}
Come again Learn again !
« iCodeBuzz »
No comments:
Post a Comment