Question: In Javascript Write down codes to enter as many numbers as you want until you enter a zero. Then, the app will display the average
In Javascript Write down codes to enter as many numbers as you want until you enter a zero. Then, the app will display the average of all the numbers you've entered, excluding the zero. If the first number you've entered is a zero, then display that the app cannot calculate the average because you haven't entered any number other than the zero.
For example, if you enter the following numbers:
- 7
- 4
- 6
- 2
- 2
- 0
The average is 22 / 5 or 4.4.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
