diff --git a/ejer10/10.html b/ejer10/10.html new file mode 100644 index 0000000..7785310 --- /dev/null +++ b/ejer10/10.html @@ -0,0 +1,25 @@ + + + + + + + + + +

Asteriscos

+
+ + + + + + +
+ + + diff --git a/ejer10/10.js b/ejer10/10.js new file mode 100644 index 0000000..28e56ea --- /dev/null +++ b/ejer10/10.js @@ -0,0 +1,9 @@ +function main() { + var numAst = document.getElementById('numeroDeAsteriscos').value; + for (let a = 0; a < numAst; a++) { + for (let i = 0; i < numAst; i++) { + document.writeln(`*`); + } + document.writeln(`
`) + } +} diff --git a/ejer11/11.html b/ejer11/11.html new file mode 100644 index 0000000..7834f7f --- /dev/null +++ b/ejer11/11.html @@ -0,0 +1,25 @@ + + + + + + + + + +

Asteriscos

+
+ + + + + + +
+ + + diff --git a/ejer11/11.js b/ejer11/11.js new file mode 100644 index 0000000..265999c --- /dev/null +++ b/ejer11/11.js @@ -0,0 +1,14 @@ +function main() { + var numAst = document.getElementById('numeroDeAsteriscos').value; + for (let a = 1; a < numAst; a++) { + + for (let i = 0; i < a; i++) { + document.writeln(`*`); + } + document.writeln(`
`) + + } + for (let i = 0; i < numAst / 2; i++) { + document.writeln(`*
`) + } +}