- After the line:
PART 3: YOUR CODE STARTS AFTER THIS LINE:
- Create the following variables:
numberOne
numberTwo
numberThree
total
average
- Prompt the user to enter three numbers and store them in the three number variables.
- Convert each entered value into a number with the
Number() function.
- Add the three number variables together and put the results into the
total variable.
- Calculate the average of the three numbers by dividing the
total variable by the number 3. Put the results into the average variable.
- Display each entered number to the page with some text preceding it.
- Display the total to the page with some descriptive text.
- Display the average to the page with some descriptive text.
- Sample output:
The first number: 10
The second number: 15
The third number: 25
The total: 50
The average: 16.666666666666668
Your Part 3 Output: