Page 1 of 1

11727 - Cost Cutting

Posted: Tue May 15, 2018 8:54 am
by Gamer_CSE_JU
I am trying to get the middle value but somehow my conditions are not working or else I am doing them wrong. I am a newbie. Can anyone help please? Here's the code:

Code: Select all

int main() {
int i,count, a, b, c;

scanf("%d", &count);
    scanf("%d %d %d", &a, &b, &c);
    if((a<b&&b<c) || (c<<b&&b<<a)) {
        printf("Case %d: %d\n",i, b);
    } else if((b<<a&&a<<c)||(c<<a&&a<<b)) {
        printf("Case %d: %d\n",i, a);
    } else {
        printf("Case %d: %d\n",i, c);

return 0;