tablamultiplicarwhile.sh 337 B

123456789101112131415
  1. #!/bin/bash
  2. echo -n "Introduce numero de tabla: "
  3. read Tabla
  4. echo -n "Introduce numero final: "
  5. read Final
  6. Index=1
  7. while [ $Index -le $Final ]; do
  8. echo -e "$Index\t*\t$Tabla\t=\t$(expr $Index '*' $Tabla)"
  9. Index=$(expr $Index + 1)
  10. done
  11. #for Index in $(seq $Final); do
  12. # echo -e "$Index\t*\t$Tabla\t=\t$(expr $Index '*' $Tabla)"
  13. #done