Skip to content
Advertisement

how to print out the user number input with the result instead of showing only result?

I am trying to print out the numbers that user input but i got no idea (example: when user input 2 and 3, it should be show 2+3=5 instead of 5 alone ) also how to find the average of the number too. here is my code:

JavaScript

}

as you can see at (star)(star)…..(star)(star) it shouldn’t be /2 because it doesn’t look like a professional at all…

Advertisement

Answer

You may use formated output here:

JavaScript

Formats:

JavaScript

To compute average in decimals:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement