fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n;
  5. printf("enter a number:" );
  6. scanf("%d",&n);
  7. if(n%2==0){
  8. printf("even number:%d\n ",n);
  9. }
  10. else{
  11. printf("odd number:%d\n ", n);
  12. }
  13.  
  14. // your code goes here
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5288KB
stdin
3
stdout
enter a number:odd number:3