Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
703 B
2
Indexable
Never
#include <stdio.h>

int main()
{
    int a, b, c, d, min = 0;
    int x = -100000, y = 100000;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    
    
    if ((x<=a && a<=y) && (x<=b && b<=y) && (x<=c && c<=y) && (x<=c && c<=y))
    {
        if(a%2!=0)
        {
            min = a;
        }
        if(b%2!=0 & (b<min || min == 0))
        {
            min = b;
        }
        if (c%2!=0 & (c<min || min == 0))
        {
            min = c;
        }
        if (d%2!=0 & (d<min || min == 0))
        {
            min = d;
        }
        if (min != 0)
        {
            printf("%d", min);
        }
        
    else
    {
        printf("No odd number found");
    }
    }
    return 0;
}