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
What goes hand and hand with focus? A) company B) non-profit C) business D) organization
Katyanochek1 [597]

Answer:

I think the answer is D but please let me know if i am wrong

Explanation:

8 0
2 years ago
Read 2 more answers
Which tab is used to insert a hyperlink onto a slide
Roman55 [17]
The tab used to instead a Hyperlink into a slide is the Insert tab under the “Links” group.
5 0
2 years ago
Read 2 more answers
Suppose we can buy a chocolate bar from the vending machine for $1 each. Inside every chocolate bar is a coupon. We can redeem s
Tanya [424]

Answer and Explanation:

Using JavaScript:

/* program should take N input which represents the dollar amount and output how many chocolate bars and how many coupons we have*/

function chocolatebar(dollars){

var dollaramt= dollars;

var i;

for(i=0; i <= dollaramt; i++){

i=i+6

?

Alert ("you have 1 extra chocolate bar");

:

Alert ("keep buying chocolate bars to get more coupons for a bonus chocolate bar")

}

}

*

7 0
2 years ago
Which wireless security methods uses a common shared key configured on the wireless access point and all wireless clients?
Korolek [52]

Answer:

WEP, WPA Personal, and WPA2 personal, these are the wireless security method which are used common shared key configured on the wireless access point and wireless clients. WEP is the wired equivalent privacy and WPA stands for wifi protected access.

These are the wireless security protocols, which basically provide the wireless security to the system. Wireless network are transmitted within the range for every direction. WPA modern application used the pre shared key system and this system are developed for link the device to the access point easily.

4 0
3 years ago
After you use the create sequence statement to create a sequence, you can use the _______________________ pseudo column to get t
user100 [1]

After you use the create sequence statement to create a sequence, you can use the NEXTVAL  pseudo column to get the next value in the sequence.

<h3 /><h3>How do you create a sequence?</h3>
  • You must have the Create any sequence system privilege to create a sequence in another user's schema.
  • Specify the schema that will hold the sequence.
  • If you leave out schema, Oracle Database will create the sequence in your own schema. Name the sequence that will be created.
  • Pseudo-columns allow selection, but you cannot edit, update, or remove their values.
  • A pseudo-column is analogous to a function that does not accept any inputs. This section goes over the two pseudo-columns, CURRVAL and NEXTVAL.
  • A pseudo column is a "column" that displays a value when a value is selected but is not one of the table's true columns.
  • Two examples are SysDate and RowID. It is frequently used in tandem with the DUAL table.
  • After you utilize the make sequence statement to make a sequence, you can utilize the NEXTVAL pseudo column to obtain the next value in the sequence.

To learn more about NEXTVAL, refer to:

brainly.com/question/13043887

#SPJ4

3 0
8 months ago
Other questions:
  • User accounts will be locked out after authentication is attempted
    7·1 answer
  • HELP! Identify the parts of the table. <br>A) Primary Key<br>B) Field<br>C) Record<br>D) Table<br>​
    15·2 answers
  • What does social protocol means in network?
    9·1 answer
  • A document created by the scriptwriter that contains general information about a program is called _____.
    15·1 answer
  • You are troubleshooting a client connectivity problem on an Ethernet network. The client system has intermittent connectivity to
    9·1 answer
  • PLEASE GO SUPPORT I JUST STARTED 3 WEEKS AGO AND I GET NO VIEWS
    12·2 answers
  • Political parties to address the interest of civil society<br>​
    7·1 answer
  • 4.8 code practice question 1 edhesive
    8·2 answers
  • Topic: Drivers ed 100 points and brainliest!
    9·1 answer
  • What computer is designed for particular application​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!