Create a script called odd_even.js. Write a program that generates 100 random numbers and keeps count of how many of those random numbers are even and how many of them are odd. Sum the even numbers and sum the odd numbers. Use a function to check if a given number is even or odd and use a function that returns the sum of a given array. Display the results as:
Even Number Count: 72
Odd Number Count: 28
Sum Even: 560
Sum Odd: 433
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-54759.pdf
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment