C-Code to check whether a triangle is valid or not, when the three angles of the triangle are entered through the keyboard. A triangle is valid if the sum of all the three angles is equal to 180 degrees

#include<stdio.h>
void main()
{
int an1,an2,an3,total;
printf("Enter First Angle of Triangle : ");
scanf("%d",&an1);
printf("Enter Second Angle of Triangle : ");
scanf("%d",&an2);
printf("Enter Third Angle of Triangle : ");
scanf("%d",&an3);
total=an1+an2+an3;
if(total==180)
     printf("The triangle is valid ");
else
     printf("The triangle is invalid");

}