Advertisement
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 the triangle:\n");
- 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
Advertisement