From 1d3787dc42b6f77687e1f08a0f2a4120ae6ad5f6 Mon Sep 17 00:00:00 2001 From: raul Date: Thu, 18 Jan 2024 12:22:02 +0100 Subject: [PATCH] Completed more exercises --- ejer10/10.html | 25 +++++++++++++++++++++++++ ejer10/10.js | 9 +++++++++ ejer11/11.html | 25 +++++++++++++++++++++++++ ejer11/11.js | 14 ++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 ejer10/10.html create mode 100644 ejer10/10.js create mode 100644 ejer11/11.html create mode 100644 ejer11/11.js 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(`*
`) + } +}