Browse Source

Clase Lunes 2017-10-30

Guzmán Castanedo Villalba 3 years ago
parent
commit
434fcfee75
1 changed files with 15 additions and 0 deletions
  1. 15 0
      tablamultiplicarwhile.sh

+ 15 - 0
tablamultiplicarwhile.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+
+echo -n "Introduce numero de tabla: "
+read Tabla
+echo -n "Introduce numero final: "
+read Final
+
+Index=1
+while [ $Index -le $Final ]; do
+	echo -e "$Index\t*\t$Tabla\t=\t$(expr $Index '*' $Tabla)"
+	Index=$(expr $Index + 1)
+done
+#for Index in $(seq $Final); do
+#	echo -e "$Index\t*\t$Tabla\t=\t$(expr $Index '*' $Tabla)"
+#done