rony-Rony_05

problem #3:triangle

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