Advertisement
Mahmud33

triangle

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