URI Online Judge Solution | 1035 Selection Test 1

Hints: Don’t forget to think that A is even so we have to use a%2==0 that’s it

#include<iostream>
#include<cstdio>
int main()
{
    int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);

if(b>c && d>a){
        if(c+d>a+b){
              if((c>0) &&(d>0) && (a%2==0)) {
        printf("Valores aceitos\n");
        }
}
}
else{
    printf("Valores nao aceitos\n");
}
return 0;
}

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published.