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]
2 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]2 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
When you are fit, you can exercise and do physical work without getting too tired. A. True B. False\
enot [183]

Answer:

A.

Explanation:

But all of us get tired

3 0
3 years ago
Read 2 more answers
3-d metal printing, artificial intelligence, and self-driving cars are examples of ___________.
BabaBlast [244]
My name is Chris I'm sorry for being so late but no I got it and I will be there for being such a great time with you and your team and I will get back to you are you still looking I'm sorry for being a little bump it to the only thing I can think of is that a little bit of time
4 0
3 years ago
Read 2 more answers
Why do you think it is important to consider ethical considerations when reviewing technology and assessing the impact of partic
IgorLugansk [536]

Answer:

The correct answer should be: "It is important to reaffirm and test technologies' importance and impact to society in order to reflect upon their benefits or damages to the environment".

Explanation:

Technologies have a major importance in society nowadays, although they also have a great impact in the environment, whether for good or not. The fact is that reviewing and assessing technologies' importance and impact are necessary to test and garantee if they have been developed in an environmental friendly manner or with no worries for natural resources and society. Therefore, any technology must be ethical in terms of improving society with no damages, or as least as possible, to the environment.

(ps: mark as brainliest, please?!)

7 0
3 years ago
PLEASE HELP!!! History abounds with instances in which the work of scientists and artists were affected by the political, religi
Masteriza [31]
Social Media affects them
7 0
3 years ago
According to the SANS Institute, a __________ is typically a document that outlines specific requirements or rules that must be
nata0808 [166]
That’s should be in the quizlet I think..
7 0
3 years ago
Other questions:
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • To become a news anchor, you should get a Bachelor's degree in:
    11·2 answers
  • What would happen to a eukaryotic cell if all its mitochondriawere destroyed
    7·1 answer
  • Which style of leadership would be most helpful to Charles in the following situation? Charles has just started an internship at
    15·1 answer
  • Write a Python program to do the following:
    12·1 answer
  • What is the duty of business to contribute to the well-being of society
    12·1 answer
  • Why is it important to use random assignment when determining which research participants will comprise the different treatment
    12·1 answer
  • PrimeFactorization.java: Write a program that begins by reading in a series of positive integers on a single line of input and t
    12·1 answer
  • Can you please look through this code and see wants wrong with it? its in python
    11·1 answer
  • in the future, mobile technologies are expected to be used more than desktop computers today. what other improvements are helpin
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!