From 515098716a178334c903088111874afe409d4916 Mon Sep 17 00:00:00 2001 From: cecilia bueno fermoso Date: Thu, 26 Sep 2013 16:35:10 +0200 Subject: [PATCH 1/3] triple --- scripts/triple.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/triple.txt diff --git a/scripts/triple.txt b/scripts/triple.txt new file mode 100644 index 0000000..a140885 --- /dev/null +++ b/scripts/triple.txt @@ -0,0 +1,12 @@ +include + + + +int cuadruple(int numero) +{ + int resultado=0; + + resultado=numero*3; + return resultado; + +} \ No newline at end of file From a2ebcc0827faeb08c4eb70940c06cb48979925f4 Mon Sep 17 00:00:00 2001 From: Daniel Ruiz Date: Thu, 26 Sep 2013 20:16:40 +0200 Subject: [PATCH 2/3] Create modulo con shell --- scripts/triple.txt | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 scripts/triple.txt diff --git a/scripts/triple.txt b/scripts/triple.txt deleted file mode 100644 index a140885..0000000 --- a/scripts/triple.txt +++ /dev/null @@ -1,12 +0,0 @@ -include - - - -int cuadruple(int numero) -{ - int resultado=0; - - resultado=numero*3; - return resultado; - -} \ No newline at end of file From 941aa99cbd46ac7332f41116b4621992a9b47990 Mon Sep 17 00:00:00 2001 From: Daniel Ruiz Date: Thu, 26 Sep 2013 20:28:07 +0200 Subject: [PATCH 3/3] Create modulo con shell --- scripts/modulo.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/modulo.js b/scripts/modulo.js index 9ee3128..75d5687 100644 --- a/scripts/modulo.js +++ b/scripts/modulo.js @@ -1,3 +1,9 @@ -function modulo(n,modulo){ - return n%modulo; -} \ No newline at end of file +mod=0; +echo "Calcula el modulo" +echo "=============================" +echo "Introducir el primer numero" +read n1 +echo "Introducir el segundo numero" +read n2 +let mod=n1%n2 +echo "El modulo es=" $mod; \ No newline at end of file