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 the angles of triangle:");
- 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;
- }
Add Comment
Please, Sign In to add comment