1035 - Selection Test 1
A Solution in c
int main()
{
int A, B, C, D;
scanf("%d %d %d %d", &A, &B, &C, &D);
if((B>C&&D>A)&&(C+D>A+B)&&(C>=0&&D>=0)&&(A%2==0))
{
printf("Valores aceitos\n");
}
else
{
printf("Valores nao aceitos\n");
}
return 0;
}
Lakshman |
My name is Lakshman Gope. I'm a problem solver and a blogger. Now I am a student at Daffodil International University Department of Software Engineering. I like to learn algorithms and write clean code in an efficient and optimized way. I've been working on c, c++ and Java for a year and a half continuously.
No comments