Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C program to input angles of a triangle and check whether triangle is valid or not.
- #include<stdio.h>
- int main(){
- int A1,A2,A3,total;
- printf("INPUT THE ANGLES :");
- scanf("%d%d%d",&A1,&A2,&A3);
- total=A1+A2+A3;
- if(total == 180 && A1 != 0 && A2 != 0&& A3 != 0 )
- {
- printf("Triangle is valid\n");
- }
- else printf("Triangle is not valid\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement