Skip to content

Commit

Permalink
Tarea 6 con bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaquinBonet committed Mar 25, 2021
1 parent 28276f5 commit f96594c
Show file tree
Hide file tree
Showing 372 changed files with 91,535 additions and 4 deletions.
46 changes: 46 additions & 0 deletions tareas/clase-6/calculos-mio.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,49 @@ function obtenerPromedio(numeros) {

return (acumulador / numeros.length).toFixed(2);
}

function obtenerMayorSalario(array){
let mayorSalario = array[0]
for (i = 0; i < array.length; i ++){
if (array[i] > mayorSalario){
mayorSalario = array[i]
}
} return mayorSalario;
}

function obtenerMenorSalario(array){
let menorSalario = array[0]
for (i = 0; i < array.length; i ++){
if (array[i] < menorSalario){
menorSalario = array[i]
}
} return menorSalario;
}

function obtenerPromedioSalarios(array) {
let suma = 0;
for (let i = 0; i < array.length; i++) {
suma += array[i];
}

return (suma / array.length).toFixed(2);
}


function obtenerSalariosMensuales(array){
let array2 = []

for (i = 0; i < array.length; i++){
array2.push(Number(array[i] / 12))
}
return array2
}

function obtenerPromedioSalariosMensuales(array2){
let suma2 = 0;
for (let i = 0; i < array2.length; i++) {
suma2 += array2[i];
}

return (suma2 / array2.length).toFixed(2);
}
23 changes: 21 additions & 2 deletions tareas/clase-6/index-mio.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="main-mio.css"/>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css"/>
<title>Tarea 6</title>
</head>
<body>

<form id="calculador-edades">

<label for="cantidad-integrantes">Ingrese la cantidad de integrantes</label>
<input type="number" id="cantidad-integrantes"/>
<button type="submit" id="siguiente-paso">Siguiente</button>
<button type="submit" id="siguiente-paso" class="btn btn-primary">Siguiente</button>

<div id="integrantes">

Expand All @@ -27,7 +29,24 @@
<p>El promedio de edad es: <strong id="promedio-edad"></strong></p>
</div>

<button type="reset" id="resetear">Resetear</button>

<div id="salarios">

</div>
<button type="button" id="crear-salario" class="oculto" >Crear salario</button>

<button type="button" id="quitar-salario" class="oculto" >Quitar salario</button>
<button type="button" id="calcular-salarios" class="oculto">Calcular salarios</button>

<div id="analisis-salarios" class="oculto">
<p>El mayor salario anual es: <strong id="mayor-salario"></strong></p>
<p>El menor salario anual es: <strong id="menor-salario"></strong></p>
<p>El promedio de salario anual es: <strong id="promedio-salario"></strong></p>
<p>El promedio de salario mensual es: <strong id="promedio-mensual-salario"></strong></p>

</div>

<button type="reset" id="resetear" class="btn btn-primary">Resetear</button>
</form>

<script type="text/javascript" src="calculos-mio.js"></script>
Expand Down
38 changes: 38 additions & 0 deletions tareas/clase-6/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions tareas/clase-6/node_modules/bootstrap/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

209 changes: 209 additions & 0 deletions tareas/clase-6/node_modules/bootstrap/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f96594c

Please sign in to comment.