Advertisement
samrina_sarkar_7

FInd Triangle

Jun 20th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a,b,c,sum;
  5.     printf("Enter three angles of a triangle\n");
  6.     scanf("%d%d%d",&a,&b,&c);
  7.     sum=a+b+c;
  8.     if(sum==180&&a!=0&&b!=0&&c!=0)
  9.     {
  10.         printf("Triangle is valid");
  11.     }
  12.     else
  13.     {
  14.         printf("Triangle is not valid");
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement