Desarrollar un programa que permita almacenar las edades de un grupo de 10 personas en un vector de enteros y luego determine la cantidad de personas que son menores de edad, mayores de edad, cuántos adultos mayores, la edad más baja, la edad más alta y el promedio de edades ingresadas. Para el ejercicio anterior suponga que un adulto mayor debe tener una edad igual o superior a 60. Debe validar para cada ingreso que los valores estén en un rango entre 1 y 120 años. En caso de error deberá notificar y solicitar un nuevo valor.
FUENTES UTILIZADAS:
Getting user input from NodeJS using prompt-sync module
https://sebhastian.com/javascript-con...
Append an item to an array
https://developer.mozilla.org/en-US/d...
while Loop
https://developer.mozilla.org/en-US/d...
isNaN() function
https://developer.mozilla.org/en-US/d...
parseInt() function
https://developer.mozilla.org/en-US/d...
APLICACIONES REQUERIDAS:
Descargar Visual Studio Code: https://code.visualstudio.com/
Descargar NodeJS: https://nodejs.org/en/
#array #vector #javascript #while #programming #visualstudiocode #CreatingCode
On this page of the site you can watch the video online Arrays in JavaScript using NodeJs. | Receive data by console in Javascript using Visual Studio Code. with a duration of hours minute second in good quality, which was uploaded by the user Creating Code 14 October 2022, share the link with friends and acquaintances, this video has already been watched 1,568 times on youtube and it was liked by 50 viewers. Enjoy your viewing!