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
Crank
3 years ago
14

Write a programe to add two numbers using function with return type"void".

Computers and Technology
1 answer:
Grace [21]3 years ago
6 0

Answer:

#include<iostream>

using namespace std;

//create the function which add two number

void addTwoNumber(int num_1,int num_2)

{

   int result = num_1 + num_2;  //adding

   

   cout<<"The output is:"<<result<<endl;  //display on the screen

}

//main function

int main(){

   //calling the function

   addTwoNumber(3,6);

   return 0;

}

Explanation:

First, include the library iostream for using the input/output instructions.

then, create the function which adds two numbers. Its return type is void, it means the function return nothing and the function takes two integer parameters.

then, use the addition operation '+' in the programming to add the numbers and store the result in the variable and display the result.

create the main function for testing the function.

call the function with two arguments 3 and 6.

then, the program copies the argument value into the define function parameters and then the program start executing the function.

You might be interested in
George has to present the goals of information management to his team member. What is a goal of information management? The goal
Law Incorporation [45]

Answer:

The purpose of information management is to: design, develop, manage, and use information with insight and innovation. support decision making and create value for individuals, organizations, communities, and societies.

Explanation:

5 0
3 years ago
Kelly is preparing for a speech that she will deliver in front of her language arts class. She wants to survey her classmates to
Hitman42 [59]
What is the speech on???

8 0
3 years ago
Read 2 more answers
Which sentence in the passage conveys the message that drones can be used in the study of history?
DENIUS [597]
Well the drone could go over the city then with that footage make a 3D model of what it probably looked like
5 0
3 years ago
Read 2 more answers
Hy <br> Anyone from kerala?
Lera25 [3.4K]

Answer:

i dont know

Explanation:

7 0
3 years ago
Read 2 more answers
How do I make a stepper motor turn clockwise?
oksano4ka [1.4K]
Just reverse the connections to one winding and the motor will go the other way, I believe.
5 0
4 years ago
Other questions:
  • The ____ command is used to disconnect a datatable object from the database. (
    15·2 answers
  • Using the employment websites, search for part-time jobs that relate to the career fields you are interested in pursuing or to y
    12·2 answers
  • Two types of formulas in Excel, what are they? A. Complex and simple, B. General and currency, C. Logical and Boolean, D. Trig a
    15·1 answer
  • Could someone please explain to me the an electrical circuit.
    13·2 answers
  • Two numbers are given (numbers are entered from the keyboard). If both numbers are positive, then output their sum, if both numb
    14·1 answer
  • You don’t design new software. Instead, you work with software that already exists to be sure that it keeps running smoothly. Wh
    10·2 answers
  • the front desk of the Nocete's Hotel will comlute the total room sales (TRS) of Room 101.The room was occupied three times and t
    6·1 answer
  • When formatting numbers with the Comma Number Format tool, the numbers are formatted with _________.
    10·1 answer
  • What is the difference between PowerPoint and Outlook?
    5·1 answer
  • Which word describes an important characteristic of good computer
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!