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
For the Address Block 195.200.0.0/16 a. If you have 320 Customers that need 128 addresses/customer - will there be enough addres
Shkiper50 [21]

Answer / Explanation:

195.200.0.0/16

Note: Class C address can not be assigned a subnet mask of /16 because class c address has 24 bits assigned for network part.

2ⁿ = number of subnets

where n is additional bits borrowed from the host portion.

2ˣ - 2 = number of hosts

where x represent bits for the host portion.

Assuming we have 195.200.0.0/25

In the last octet, we have one bit for the network

number of subnets  = 2¹  =2 network addresses  

number of host = 2⁷ - 2= 126 network addresses per subnets

8 0
3 years ago
What is a butt cap? (0.5 points)
777dan777 [17]

Answer:

Butt cap chops off the stroke at the end.

Explanation:

Stroke end are called caps, other parts of a stroke are joins and dashes. There are three types of caps used in Computer graphics design, they are;

Butt cap, round cap and projecting cap.

5 0
2 years ago
How are the number of rows calculated.​
Eva8 [605]

Answer:

ROWS function

Explanation:

Hope this helped

6 0
2 years ago
Which term refers to an interface between HTML elements and JavaScript program code that allows JavaScript code to manipulate HT
vfiekz [6]

I believe the answer is D, document object model. Conditional Statements deal with if statements, iterative structures are while and for loops, HTML tags are the tags which help to format and define a webpage, and src attribute deal with specifying external sources for certain tags.

4 0
3 years ago
What is an embedded system. Give examples
IRINA_888 [86]

Answer:

An embedded system is a part of a larger system which has either one or a limited number of dedicated functions.

It doesn't require much power to run and is cheap to make and design.

Explanation:

Examples include: cars, microwaves, traffic lights, washing machines, phones etc

6 0
3 years ago
Other questions:
  • . Virtualization simplifies the use of resources, isolates users from one another, supports replication and mobility, but exacts
    7·1 answer
  • Suppose that a computer can read or write a memory word in 5 nsec. Also suppose that when an interrupt occurs, all 32 CPU regist
    10·2 answers
  • Paul has been working long hours. He is tired and distracted by family issues,
    10·1 answer
  • A port is the point at which a peripheral device attaches to or communicates with a computer or mobile device. True False
    15·1 answer
  • Magbigay ng ibang produkto na ginagamitan ng kasanayan ng basic sketching shading at outlining ​
    12·1 answer
  • Hi wanna play fortnite tomorrow add me im batjoker09 no caps or spaces
    13·1 answer
  • The East Coast sales division of a company generates 62 percent of total sales. Based on that percentage, write a Python program
    7·1 answer
  • Impromptu speaking ability is very important in the workplace to clearly and effectively communicate ideas. An effective impromp
    8·2 answers
  • Describe a NIC card and can you have more than one?
    13·1 answer
  • What is referential integrity
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!