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
Any one know??please let me know
babunello [35]

Answer:

B

Explanation:

4 0
2 years ago
Read 2 more answers
6. The NADH and FADH2 produced during the Krebs cycle pass their electrons down the 7. __ __ __ __ __ __ __ __ __ __ __ __ __ __
AlladinOne [14]

Answer:

The NADH and FADH2 produced during the Krebs cycle pass the electrons down  electron transport chain in the mitochondria to generate more ATP molecules

Explanation:

FADH2 stands for Flavin adenine dinucleotide and NADH stands for Nicotinamide adenine dinucleotide.

Both are created from FAD and NAD+ through reduction-oxidation reactions in the Krebs cycle during respiration as explained below:

This cycle gives off small amounts of energy in the form of adenosine triphosphate, or ATP, and produces these compounds, FADH2 and NADH. The Krebs cycle is like a wheel. Every time it makes one full rotation, energy is created and released. As you can see from the diagram, the NAD+ and FAD are brought in at key points throughout the cycle and are attached to other electrons resulting in the formation of NADH and FADH2.

This energy is then shuttled off to be used by the cell, mostly for the continuation of cellular respiration.

As they are shuttled away, these two compounds are used to move electrons into the electron transport chain, the final stage of respiration. It is in this stage that most of the energy is created and released from the mitochondria (powerhouse of the cell).

Basically the NADH and FADH2 are affixed with electrons and tranfered to the inner membrane of the mitochondria. The travel down the electron transfer chain, releasing electrons they once had. Thereby releasing alot of energy in the process

3 0
3 years ago
When did economies begin?
Pavlova-9 [17]
They began in ancient times the babylons started trading
6 0
3 years ago
Read 2 more answers
Find the titles of courses in the Computer Science department that have 3 credits. Find the IDs of all students who were taught
Kay [80]

Answer:

Explanation:

To solve this we break down the question and write the programme in steps as shown in the attachment

Download docx
4 0
3 years ago
Which of theses is NOT one of the standard Text filters in Excel 2013?<br><br>​
aalyn [17]

Yes, it is possible to move a worksheet to open another workbook but not to copy it there. Explanation: Microsoft Excel is a powerful tool for organizing work or business-related things etc.

6 0
2 years ago
Other questions:
  • Marie uses a browser to visit a blog. What is the unique identifier of the blog? A. web page B. website C. web address D. email
    7·2 answers
  • It is used to replace numeric number of a website​
    7·1 answer
  • Jeffrey works with a huge database of spreadsheet records each day. To organize and identify these spreadsheets, he wants to ass
    7·2 answers
  • What is the best data structure to solve the following problem? a) A list needs to be built dynamically. b) Data must be easy to
    11·1 answer
  • Which of the following is a change that will not affect the pressure in a container?
    9·2 answers
  • What is LINUX?
    6·2 answers
  • 1.printer is an example of......... device.<br><br>​
    11·2 answers
  • What are the factors that affect self-confidence?
    15·1 answer
  • Interest on loan paid to sangam stores Rs5000(journal entry)​
    13·1 answer
  • You have been asked to investigate a web server for possible intrusion. You identify a script with the following code. What lang
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!