Advertisement
PROFESSOR_AIH

selection test 1

Mar 25th, 2022
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a,b,c,d,sum1=0,sum2=0,count=0;
  5.     scanf("%d %d %d %d",&a,&b,&c,&d);
  6.     sum1=c+d;
  7.     sum2=a+b;
  8.     if(b>c && d>a)
  9.         if(sum1>sum2)
  10.             if(c>=0 && d>=0 && a%2==0)
  11.                 count++;
  12.     if(count==1)
  13.         printf("Valores aceitos\n");
  14.     else if(count==0)
  15.         printf("Valores nao aceitos\n");
  16.  
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement