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
raketka [301]
3 years ago
7

Write a function called calculate() that accepts three integer Numbers as arguments, compute these values : Sum and Product and

Return these computed results to the main program.
Computers and Technology
1 answer:
Dmitrij [34]3 years ago
5 0

Answer:

int* calculate(int a,int b,int c){

   int result[] = {0,0};

   int sum = a+b+c;

   int product = a*b*c;

   result[0] = sum;

   result[1] = product;

   return result;

}

Explanation:

The function is a block of the statement which performs the special task.

The function can return one integer, not more than one integer.

If we want to return multiple values then, we can use array.

we store the result in the array and return that array to the main function.

This is the only possible way to return multiple values.

So, define the function with return type array and declare the array with zero value.

Then, calculate the values and store in the variable after that, assign to the array.

Finally, return that array.  

You might be interested in
Which is the highest level of the hierarchy of needs model?
galben [10]

Answer:

A

Explanation:

3 0
3 years ago
Which arcade game, released in 1972, is considered to be the first to be commercially successful?.
nikitadnepr [17]

Answer:

Pong

Explanation:

Pong

4 0
2 years ago
Along with an ip address, a subnet mask, and a name server, the other thing required for a computer to operate on a network is a
laiz [17]

Along with an IP address, a subnet mask, and a name server, the other thing required for a computer to operate on a network is a primary gateway. The primary gateway acts as an access point which forwards information to another network or the internet.

6 0
3 years ago
Which administrative tool can you use to check your computer's health or troubleshoot problems with the operating system or soft
Fiesta28 [93]

Answer:

performance monitor

Explanation:

7 0
3 years ago
Read 2 more answers
Einstein's famous equation states that the energy in an object at rest equals its mass times the squar of the speed of light. (T
musickatia [10]

Answer:

The complete program is as follows:

m_str = input('Input m: ')

mass = float(m_str)

e = mass * 300000000**2

print("e = ",e)

Explanation:

This is an unchanged part of the program

m_str = input('Input m: ')

This converts m_str to float

mass = float(m_str)

This calculates the energy, e

e = mass * 300000000**2

This is an unchanged part of the program

print("e = ",e)

4 0
3 years ago
Other questions:
  • Pointsfor a failover cluster, what type of network would you use to communicate with an iscsi device?
    15·1 answer
  • . Given an initially empty stack s that accepts integers, the following operations are performed: s.push (10) s.push (20) s.push
    13·1 answer
  • Which relationship is possible when two tables share the same primary key? one-to-one one-to-many many-to-one many-to-many
    15·2 answers
  • Text messaging is an example of nonverbal communication. Please select the best answer from the choices provided. T F
    7·2 answers
  • if you're using the paintbrush tool and want to change the color of the paint being used what should you change
    9·2 answers
  • Copy the following code and run it. You should break it into the following 3 functions
    6·1 answer
  • The term ____ describes primary storage devices that are implemented as microchips, can read and write with equal speed, and can
    8·1 answer
  • A(n) _________ is a computer system which is part of a larger system which performs a dedicated function.
    8·1 answer
  • Please create C program, the task is to implement a function edoublepowerx that has an input parameter x of floating-point value
    11·1 answer
  • Ian kno da answer tell me
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!