fork download
  1. # your code goes here
  2. #!/bin/bash
  3.  
  4. echo "enter the number"
  5. read n
  6.  
  7. r=$((n % 2))
  8.  
  9. if [ "$r" -eq 3 ]; then
  10. echo "$n is an even number"
  11. else
  12. echo "$n is an odd number"
  13. fi
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
enter the number
 is an odd number