SHARE
TWEET

Aud Kolok Zad1

a guest Nov 19th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /******************************************************************************
  2.  
  3.                             Online C Compiler.
  4.                 Code, Compile, Run and Debug C program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <stdio.h>
  10.  
  11. int main()
  12. {    
  13.     int n;
  14.     int i;
  15.     int maxL=0, redenBroj;
  16.     scanf("%d", &n);
  17.     for(i=1;i<=n;i++){
  18.         int x,y,z;
  19.         scanf("%d %d %d", &x, &y, &z);
  20.         if (x+y>z && x+z>y && y+z>x) {
  21.             printf("%d %d %d Moze\n", x, y ,z);
  22.             int L;
  23.             L=x+y+z;
  24.             if (L > maxL) {
  25.                 maxL=L;
  26.                 redenBroj=i;
  27.             }
  28.         } else {
  29.             printf("%d %d %d Ne moze", x, y ,z);
  30.         }
  31.     }
  32.    
  33.     printf("Nagolem perimetar e %d, reden broj e %d", maxL, redenBroj);
  34.    
  35.  
  36.  
  37.     return 0;
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top