205k views
4 votes
On the first line, place your name in a comment. Create a program that does the following: Take in three integer numbers from the user Calculates the sum of the three numbers Calculates the average of the three numbers The calculated average must be displayed as an integer value (e.g. if the sum of the three values is 7, the average displayed must be 2, not 2.3333) Calculates the product of the three numbers Report the sum, average, and product back to the user with formatted output

User Smyslov
by
4.4k points

1 Answer

3 votes

Answer and Explanation:

//buchi

Var firstNumber=prompt("please enter first number");

Var secondNumber=prompt("please enter second number");

Var thirdNumber=prompt("please enter third number");

Var numberTotal=firstNumber+secondNumber+thirdNumber;

Function calculateNumbers(){

return numberTotal;

return int(numberTotal/3);

return firstNumber*secondNumber*thirdNumber;}

Console.log(calculateNumbers());