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
To create a formula, click the cell where you want to add the formula and press the _____ key.
Ipatiy [6.2K]
C........is the answer
4 0
3 years ago
Read 2 more answers
Definition of Computer forensics?
zysi [14]

Answer:

Computer forensics is the application of investigation and analysis techniques to gather and preserve evidence from a particular computing device in a way that is suitable for presentation in a court of law. The goal of computer forensics is to perform a structured investigation and maintain a documented chain of evidence to find out exactly what happened on a computing device and who was responsible for it.

Explanation:

If this helped you, please consider brainly.

Thank you ,

Miss Hawaii

5 0
2 years ago
Read 2 more answers
____ is a philosophy and a software and system development methodology that focuses on the development, use, and reuse of small,
LiRa [457]

Answer:

d.) Service-Oriented Architecture

Explanation:

Because its definition matches

4 0
3 years ago
Java what are synchronized functions.
adelina 88 [10]

<h2>answer:</h2>

Synchronized method is used to lock an object for any shared resource. When a thread invokes a synchronized method, it automatically acquires the lock for that object and releases it when the thread completes its task.','.

4 0
3 years ago
Why do I have two random warnings?
Misha Larkins [42]
Just a guess, maybe you’ve been reported for having an incorrect answer two times? I’m really not sure I’m just trying to give out possibilities. Maybe if your a Brainly Helper you haven’t been active so they are giving you warnings? Does clicking on the warning tell you the reason for them? Maybe the system thinks your a robot? I’m not sure just trying to give possible reasons, but you could try contacting customer support, but they aren’t always the quickest at responding.

Have a good day!
8 0
3 years ago
Other questions:
  • Software development team leaders need blank skills to excel in directing their teams
    8·2 answers
  • Which activity constitutes legal computer activity?
    12·1 answer
  • Todd, a travel agent, lost his job due to no need for his skill. This is an example of what type of unemployment?
    12·1 answer
  • What is a geotag?
    10·1 answer
  • The _ are the devices that allow a computer system to communicate and interact with the outside world as well as store informati
    11·1 answer
  • How is a ink pen better than a digital pen.
    8·1 answer
  • Why is an ISA unlikely to change between successive generations of microarchitectures
    11·1 answer
  • The game begins with the player having 20 POINTS
    11·1 answer
  • Write short notes about monitor printer and speaker​
    14·2 answers
  • Types of digital divide ​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!