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
Lerok [7]
3 years ago
5

Write a function named print_sum that accepts three numbers as parameters and prints the sum.

Computers and Technology
1 answer:
OLEGan [10]3 years ago
7 0

Answer:

Complete C++ code along with output and comments for explanation is provided below.

C++ Code with Explanation:

#include <iostream>

using namespace std;

// implement a function named print_sum which takes three input numbers of type int and returns the sum of these three numbers.

int print_sum(int num1, int num2, int num3)

 {

// initialize the variable to hold the value of sum

     int sum;

// add the three numbers and store the result in the variable sum

     sum = num1 + num2 + num3;

// print the sum of three numbers

     cout<<"The sum of three numbers is: "<<sum<<endl;

 }

// driver code starts here

int main()

{

// initialize the three input numbers

   int x,y,z;

// get the three numbers from the user

   cout << "Please enter number 1: "<<endl;

   cin >> x;

   cout << "Please enter number 2: "<<endl;

   cin >> y;

   cout << "Please enter number 3: "<<endl;

   cin >> z;

// call the function print_sum to calculate the sum

   print_sum(x,y,z);

   return 0;

}

Output:

Please enter number 1:

24

Please enter number 2:

13

Please enter number 3:

7

The sum of three numbers is: 44

You might be interested in
Can we change the format of a field (e.g. Number to Dollars).
mixer [17]

I think the answer is

3 - Usually, but we may need to convert the data types (date to text)

Because we can change the format, but depends of the original format type and in what type you need to format.

I think this can help.

3 0
4 years ago
Which employees work directly with customers, helping them make deposits and withdrawals?
d1i1m1o1n [39]
I believe the answer is customer service
5 0
3 years ago
Read 2 more answers
Select the correct answer.
dedylja [7]

Answer:

D. MAN

Explanation:

A local area network (LAN) refers to a group of personal computers (PCs) or terminals that are located within the same general area and connected by a common network cable (communication circuit), so that they can exchange information from one node of the network to another. A local area network (LAN) is typically used in small or limited areas such as a set of rooms, a single building, school, hospital, or a set of well-connected buildings. Some of the network devices or equipments used in a local area network (LAN) includes an access point, personal computers, a switch, a router, printer, etc.

On the other hand, a metropolitan area network (MAN) is formed by an aggregation of multiple local area network (LAN) that are interconnected using backbone provided by an internet service provider (ISP). A metropolitan area network (MAN) spans for about 5 kilometers to 50 kilometers in size.

Basically, a metropolitan area network (MAN) spans across a geographic area such as a city and it's larger than a local area network (LAN) but significantly smaller than a wide area network (WAN).

In conclusion, the network type that the patrol services of a city's police department would most likely use is a metropolitan area network (MAN).

6 0
3 years ago
What should an administrator use to more easily assign database access permissions to multiple users?
Kruka [31]

Answer:

to allow administrators to assign rights and permissions to multiple users

Explanation:

8 0
3 years ago
Blanca is overwhelmed by all the things she has to do after school. How can she best manage her time more effectively?
kykrilka [37]

Answer:

she can prioritoze her tasks

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Name the hardware component that performs each of the following functions (1) performs calculation and/or comparisons (2) holds
    9·1 answer
  • When would an absolute cell reference be most helpful?
    12·2 answers
  • Each array in Java has a public field named ________ that contains the number of elements in the array.
    13·1 answer
  • Battery maker Duracell introduced a new product called the Duracell Powermat, which is a wireless charging pad for mobile device
    12·1 answer
  • The velocity dimension of Big Data refers to _____.
    15·1 answer
  • Write a function MaxMagnitude with two input parameters, that returns the largest-magnitude value. If the inputs are 5 7, the fu
    14·1 answer
  • A PC is not able to connect to a wired network. Pinging the loopback address is successful, but the gateway cannot be reached. O
    12·1 answer
  • I have a PTCL Router. When I reset it it stops working. So if I backup its settings and use them after reset will my PTCL Work
    13·2 answers
  • Jim is working on a network design for a small office running a Windows file and printer server with Internet
    15·1 answer
  • Suppose a computer's login mechanism first asks for a user name, and then for the password, regardless of whether or not the log
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!