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
Write a loop to print 56 to 70 inclusive (this means it should include both the 56 and 70). The output should all be written out
IRINA_888 [86]

Answer:

for i in range(56,71):

   print(i)

Explanation:

By the range 56 to 71 it means that for loop will run when i=56 to i=71, but the upper bound is one less than the upper bound, and which is 70. So the above loop will print integers from 56 to 70.

And the above code is in Python.

4 0
3 years ago
Help with scripting/coding questions!
user100 [1]

Answer:

Explanation:

For the first questions the variable's name is <u>Today,</u> and is declared like a date variable, this will be returned a date value.

For the second question, where the browser will show today's date because with the variable Today, we get the date and with the document.write(Today) is shown the variable information.

With the third question, the result will be "Hello!", because the August is the 8 month, and July the 7, in this case the IF is False and for that will show "Hello!".

5 0
3 years ago
Could you help be advanced in tech?
Amiraneli [1.4K]
Yes I can help you if you go to google or bing type In the question you have and click enter you will get the answer

P.S if it doesn't try to type it more clear
6 0
3 years ago
What is the primary reason that routing on the internet is redundant
Elena-2011 [213]

Most of the time rerouting on the internet is redundant because a router already does it automatically. For example if one path has a lot of traffic it with put the user on another path with less traffic but same destination.

<span />
4 0
3 years ago
What is the approximate reduction ratio between armature shaft and output speed of a 39MT starter motor?
bonufazy [111]

Answer:

3.5:1

Explanation:

Of course, a 4:1 gear reduction ratio also means that a gear reduction starter can often produce more torque than a much larger, heavier direct drive starter. In some cases, a direct drive starter can weigh as much as two times more than a comparable gear reduction unit. That represents a significant power/torque to weight ratio benefit, but it also means they are physically smaller and often easier to install.

3 0
3 years ago
Other questions:
  • Which of the case studies that you read (Walmart, Target or 5 Big Data Industries) caught your attention and why? Before reading
    11·1 answer
  • Are MP3 files are quick to transfer.
    11·1 answer
  • The network services and facilities that users interact with are provided by
    11·1 answer
  • When a person visits a Web site, his or her IP address and the links he or she clicked on are automatically recorded. This is an
    9·1 answer
  • 3. The combination of keys that we should press to select all document is
    14·1 answer
  • Write an application for Cody’s Car Care Shop that shows a user a list of available services: oil change, tire rotation, battery
    14·1 answer
  • Which type of CPU instruction performs arithmetic calculations and stores the results in memory?
    14·2 answers
  • What is 10x10????????????????/
    5·2 answers
  • Right-of-way is __________. A. guaranteed by Florida law B. the privilege of immediate use of the road C. earned by aggressive d
    15·1 answer
  • ___1. my1st JavaProgram<br> A. valid <br> B. invalid
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!