fork download
  1. #include <stdio.h>
  2. int main () {
  3.  
  4.  
  5. int num = 0;
  6.  
  7.  
  8. printf("Enter a number:\n");
  9. scanf("%d", &num);
  10.  
  11. if (num % 2 == 0) {
  12. printf("even\n");
  13. }
  14. else if (num % 2 != 0) {
  15. printf("odd\n");
  16. }
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Enter a number:
even