Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int X,Y,Z,sum;
- printf("Enter the angles of triangle:");
- scanf("%d %d %d",&X,&Y,&Z);
- sum=X+Y+Z;
- if(sum == 180 && X != 0 && Y!= 0 && Z != 0)
- {
- printf("Triangle is valid.");
- }
- else
- {
- printf("Triangle is not valid.");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment