URI 1035 Selection Test 1 Solution in C++
URI 1035 👀 Selection Test 1 👀Solution in C++
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
URI 1035 Solution Selection Test 1 in C++
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
if((b>c)&&(d>a)&&(c+d>a+b)&&c>0&&d>0&&(a%2==0)){
cout<<"Valores aceitos"<<endl;
}else{
cout<<"Valores nao aceitos"<<endl;
}
return 0;}
No comments