fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int num,rem;
  5. printf("Enter a number");
  6. scanf("%d",&num);
  7. rem=num%2;
  8. switch(rem)
  9. {
  10. case0:printf("\t even");
  11. break;
  12. case1:printf("t odd");
  13. break;
  14. }
  15. }
Success #stdin #stdout 0s 5224KB
stdin
1
2
10
42
11
stdout
Enter a number