1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yaroslaw [1]
4 years ago
5

On the first line, place your name in a comment. Create a program that does the following: Take in three integer numbers from th

e 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
Computers and Technology
1 answer:
Helen [10]4 years ago
8 0

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());

You might be interested in
A ____ paragraph places the first character of a text line near the left border of a placeholder.
faltersainse [42]
A left - align paragraph places the first character of a text line near the left border of a placeholder. Paragraph alignments such as left - align, center - align and etc.. Are available on every word processing programs. The answer to your question is LEFT - ALIGN.
7 0
3 years ago
Write the definition of a function divide that takes four arguments and returns no value . The first two arguments are of type i
Nastasia [14]

Answer:

#include <iostream>

using namespace std;

void divide(int numerator, int denominator, int *quotient, int *remainder)

{

*quotient = (int)(numerator / denominator);

*remainder = numerator % denominator;

}

int main()

{

int num = 42, den = 5, quotient=0, remainder=0;

divide(num, den, &quotient, &remainder);

 

return 0;

}

Explanation:

The exercise is for "Call by pointers". This technique is particularly useful when a variable needs to be changed by a function. In our case, the quotient and the remainder. The '&' is passing by address. Since the function is calling a pointer. We need to pass an address. This way, the function will alter the value at the address.

To sum up, in case we hadn't used pointers here, the quotient and remainder that we set to '0' would have remained zero because the function would've made copies of them, altered the copies and then DELETED the copies. When we pass by pointer, the computer goes inside the memory and changes it at the address. No new copies are made. And the value of the variable is updated.

Thanks! :)

8 0
3 years ago
Jason is an aspiring filmmaker. He manages finance and makes sure that everyone is involved in the project. Which role is Jason
lana66690 [7]

Answer:

a film producer.

is the role he is playing

7 0
3 years ago
Which of the following is a definition of a conventions
laiz [17]
Need more information
6 0
4 years ago
Read 2 more answers
Answer all of the questions correctly and you will be amazing. Fill in Blanks
Naya [18.7K]
A.Chicken Street
B.You just got Vectored
5 0
4 years ago
Other questions:
  • Which software application should be used to communicate in writing about an upcoming event?
    12·2 answers
  • In Windows, the log that stores events from a single application or component rather than events that might have system wide imp
    14·1 answer
  • Given that n refers to a positive integer, use a while loop to compute the sum of the cubes of the first n counting numbers, and
    12·1 answer
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • How many fields can be sorted when sorting data in Word tables? up to 3 fields 1 field at a time up to 4 fields 2 fields at a ti
    7·2 answers
  • A computer byte is the amount of data (measured in bits) that CPU can manipulate at one time/
    8·1 answer
  • A capacitor of capacitance 102/π µF is connected across a 220 V, 50 Hz A.C. mains. Calculate the capacitive reactance, RMS value
    8·1 answer
  • A___ is a placeholder where you can enter text to manipulate and give new graphical effects.​
    13·1 answer
  • If you play video games, please answer these questions it’s for a survey for my game development class!!
    5·1 answer
  • An alternative to hexadecimal notation for representing bit patterns is dotted decimal notation in which each byte
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!