Advertisement
Guest User

Aud Kolok Zad1

a guest
Nov 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement