URI 1035 Selection Test 1


A solution in c

#include<stdio.h>

int main()
{
    int a,b,c,d,e,f,g;
    scanf("%d%d%d%d",&a,&b,&c,&d);
    e=c+d;
    f=a+b;
    if(b>c && d>a && e>f && c>=0 && d>=0 && a%2==0){
        printf("Valores aceitos\n");
    }
    else {
        printf("Valores nao aceitos\n");
    }
    return 0;
}

Post a Comment

0 Comments