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