BlueBear icon

postupnost.c

BlueBear | PRO | 03/25/14 05:43:07 PM UTC | 0 ⭐ | 509 👁️ | Never ⏰ | []
C |

430 B

|

None

|

0 👍

/

0 👎

#include <stdio.h>
 
int main(void)
{
    int n, i, pred, cislo, je = 1;
 
    scanf("%d", &n);
    if (n >= 0 && n <= 10)
    {
        for (i = 0; i < n; i++)
        {
            scanf("\n%d",&cislo);
            if (i == 0)
                pred = cislo;
            else
                if ((cislo > (2*pred)) || (cislo < (pred/2)))
                    je = 0;
        }
        if (je == 0)
            printf("Postupnost je nespravna\n");
        else
            printf("Postupnost je spravna\n");
    }
    else
        return 1;
    return 0;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Syutrsz icon
    03/31/26 10:21:46 PM UTC
    text |

    0 B

    |

    0 👍

    /

    0 👎

    Best t33n active cpx link daily updates!
     Copy and paste the link in a new browser tab and then hit enter!
     https://crazyporn.@xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400
     Remove the @ 
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎