Advertisement
S_h_u_v_r_o

1074

Oct 21st, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1.  
  2. #include<stdio.h>
  3. int main()
  4. {
  5. int a,b,c=0;
  6. scanf("%d",&a);
  7. for(c=0; c<a; c++)
  8. {
  9. scanf("%d",&b);
  10. if(b>0)
  11. {
  12. if(b%2==0)
  13. {
  14. printf("EVEN POSITIVE\n");
  15. }
  16. else
  17. {
  18. printf("ODD POSITIVE\n");
  19. }
  20. }
  21. else if(b<0)
  22. {
  23. if(b%2==0)
  24. {
  25. printf("EVEN NEGATIVE\n");
  26. }
  27. else
  28. {
  29. printf("ODD NEGATIVE\n");
  30. }
  31. }
  32. else
  33. {
  34. printf("NULL\n");
  35. }
  36.  
  37. }
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement