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