Finished multi-multiplication table
This commit is contained in:
parent
23adce80cf
commit
67f3590a75
5
9.html
5
9.html
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta name="" charset="UTF-8" content="">
|
<meta name="" charset="UTF-8" content="">
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
4
9.js
4
9.js
|
@ -1,13 +1,15 @@
|
||||||
function multiplicador(multipl) {
|
function multiplicador(multipl) {
|
||||||
|
document.write(`<p align=center>`)
|
||||||
for (let i = 1; i < 11; i++) {
|
for (let i = 1; i < 11; i++) {
|
||||||
document.writeln(`${multipl} * ${i} = ${i * multipl}<br>`)
|
document.writeln(`${multipl} * ${i} = ${i * multipl}<br>`)
|
||||||
}
|
}
|
||||||
// Adding horizontal line for visual clarity
|
// Adding horizontal line for visual clarity
|
||||||
|
document.write(`</p>`)
|
||||||
document.writeln(`<hr>`)
|
document.writeln(`<hr>`)
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
// Declaring multi to hold the second number
|
// Declaring multi to hold the first number
|
||||||
var multi = 1;
|
var multi = 1;
|
||||||
|
|
||||||
// For loop that and for every time the multiplier function ends, run multi++ to sum
|
// For loop that and for every time the multiplier function ends, run multi++ to sum
|
||||||
|
|
Loading…
Reference in New Issue