2024-01-18 12:22:02 +01:00
|
|
|
function main() {
|
|
|
|
var numAst = document.getElementById('numeroDeAsteriscos').value;
|
|
|
|
for (let a = 1; a < numAst; a++) {
|
|
|
|
|
|
|
|
for (let i = 0; i < a; i++) {
|
2024-02-22 11:32:02 +01:00
|
|
|
document.writeln(`*`);
|
2024-01-18 12:22:02 +01:00
|
|
|
}
|
|
|
|
document.writeln(`<br>`)
|
|
|
|
|
|
|
|
}
|
|
|
|
for (let i = 0; i < numAst / 2; i++) {
|
|
|
|
document.writeln(`*<br>`)
|
|
|
|
}
|
|
|
|
}
|