fork download
  1. #include <stdio.h>
  2. int main() {
  3. int i, side[3], max = -1, total = 0;
  4.  
  5. for(i= 0; i < 3; i++ ) {
  6. scanf("%d",&side[i]);
  7. max = side[i] > max ? side[i] : max;
  8. total += side[i];
  9. }
  10.  
  11. if (2 * max < total) {
  12. printf("Valid\n");
  13. } else {
  14. printf("In-valid\n");
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 2164KB
stdin
4
7
8
stdout
Valid