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]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
What would you enter at the command prompt on a Linux system to display the IP addressesand the subnet masks assigned to each ne
noname [10]

Answer:

The ifconfig command.

Explanation:

A linux network system, like cisco networking devices, uses the linux operating system, in which it configuration differs from that of the cisco. It is very essential in network administration of have the basics in linux systems.

The network administrator uses the "ifconfig" command to display the IP addresses and subnet masks assigned to each network interface on a linux system.

5 0
3 years ago
HELP PLZ AM TIMED!!!~~~
vova2212 [387]

Answer:

im pretty sure its slide show

6 0
3 years ago
Read 2 more answers
Richard Palm is the accounting clerk of Olive Limited. He uses the source documents such as purchase orders, sales invoices and
sdas [7]

Answer:

Lack of segregation of duties

Explanation:

Internal Controls are set of rules and guidelines that are followed to ensure effectiveness of business operations. The main risk in the business is weak internal controls. There are some organizations with strong internal controls but implementation of such controls is a challenge for organizations. There are human errors, IT security risks, fraud and compliance risk.

The risks associated with Olive limited is that there is no segregation of duties, Richard Palm is preparing journal vouchers, posts the journal vouchers and reconciles the balance himself. If he makes an error in recording a transaction there is no one who reviews his work and can identify an error. Also if Richard is involved in a fraud and collaborates with purchase department or sales department staff, he can pass a transaction without any supervision.

5 0
3 years ago
Who plays Breath of the Wild?
eimsori [14]

Answer:

me

Explanation:

7 0
3 years ago
Read 2 more answers
Which of the following file names follows basic naming convention rules
WARRIOR [948]
Option 3:

lesson1/computer history
5 0
3 years ago
Read 2 more answers
Other questions:
  • Write a function that takes a string like 'one five two' and returns the corresponding integer (in this case, 152). A function j
    11·2 answers
  • Describe in 2–3 sentences how you would use the autosum shortcut.
    9·2 answers
  • When transporting data from real-time applications, such as streaming audio and video, which field in the ipv6 header can be use
    12·1 answer
  • The following checksum formula is widely used by banks and credit card companies to validate legal account numbers: d0 + f(d1) +
    13·1 answer
  • Which statement gives an advantage of multicellular organisms?
    7·2 answers
  • 2. How is accessing the Internet through a home network and public Wi-Fi similar?​
    15·1 answer
  • Read the citation example, and then use the drop-down menus to identify each part.
    8·2 answers
  • What is the main reason for adding somebody into the BCC list for an email?​
    9·1 answer
  • Explain with examples what is software​
    6·1 answer
  • Giving brainliest to the Person finishes this song lyric.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!