Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C Compiler.
- Code, Compile, Run and Debug C program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <stdio.h>
- int main()
- {
- int n;
- int i;
- int maxL=0, redenBroj;
- scanf("%d", &n);
- for(i=1;i<=n;i++){
- int x,y,z;
- scanf("%d %d %d", &x, &y, &z);
- if (x+y>z && x+z>y && y+z>x) {
- printf("%d %d %d Moze\n", x, y ,z);
- int L;
- L=x+y+z;
- if (L > maxL) {
- maxL=L;
- redenBroj=i;
- }
- } else {
- printf("%d %d %d Ne moze", x, y ,z);
- }
- }
- printf("Nagolem perimetar e %d, reden broj e %d", maxL, redenBroj);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement