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
4 years ago
14

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

Computers and Technology
1 answer:
Grace [21]4 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
A(n) _____ is substance in which one or more atoms have the same number of protons (i.e. the same atomic number).
natima [27]

I think it’s Element I think

3 0
3 years ago
Convert (0.255)¹⁰ into binary<br>​
nasty-shy [4]

0.01000001010001111011

Must click thanks and mark brainliest

3 0
3 years ago
Assume that x is a variable that has been declared as an int and been given a value. Assume that twice is a method (in the same
Anastasy [175]

Answer:

Arrays are indexed from 0 in pretty much every language, except stupid Microsoft languages.

Lets say that ARR_SIZE is 5 for example.

So you have an array of 5 elements. They are indexed from 0 - 4.

arr[0] // First element

arr[4] // Last element

Therefore arr[ ARR_SIZE -1 ] is the last element of the array.

That's why for loops to iterate through arrays are wrote like:

for(int i = 0; i < ARR_SIZE; ++i)

4 0
3 years ago
Indirect materials include ______. multiple choice question.
Natasha2012 [34]

Factory rent and insurance.

<h3>what is Indirect material?</h3>
  • Indirect materials are goods that, while part of the overall manufacturing process, are not integrated into the final product.
  • For example, disposable gloves, personal protective equipment, tape, etc

To learn more about it, refer

to brainly.com/question/25689052

#SPJ4

8 0
1 year ago
Where do you want to install?
Fiesta28 [93]

This really depends on the thing you are trying to install, and the device you are trying to install it on.

try to find the app info and see what devices it is compatible with. make sure you are using a compatible device, and make sure you are signed in.

7 0
3 years ago
Other questions:
  • Which of the following is an advantage of algorithmic thinking? Select all that apply.
    6·1 answer
  • Which computer tools allow you to communicate with coworkers, family,and friends
    8·1 answer
  • Copying and pasting from the internet can be done without citing the internet page, because everything on the internet is common
    13·1 answer
  • In the context of information systems, which of the following is a disadvantage of prototyping? a. A prototype is more difficult
    8·1 answer
  • Which biometric technique is considered nearly infallible from a scientific point of view and is increasingly preferred by crimi
    8·1 answer
  • On a Linux system, which command allows you to modify settings used by the built-in packet filtering firewall?
    15·1 answer
  • How do I use brainly.<br> What is brainliest.<br> And what is the rating thing about
    6·2 answers
  • The notes added to slides can be seen during the presentation. TRUE OR FALSE​
    13·1 answer
  • Consider the following code segment. How many unique new (do not count the starting process) processes are created? (you may wan
    6·1 answer
  • Outline the steps for logging into E-mail account​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!