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