Advertisement
fattahsamit

2p6

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