C++ program to find add of two number using function

#include<iostream>
using namespace std;
int addtwo(int num1, int num2);
int main()
{
int num1,num2,num3;
cout<<"\n Enter first and second number \n";
cin>>num1>>num2;
num3=addtwo(num1,num2);
cout<<"\n The sum of num1 and num2 \t"<<num3;
}
int addtwo(int num1,int num2)
{int num3;
num3=num1+num2;
return num3;
}
OUTPUT:

 Enter first and second number 
9
6

 The sum of num1 and num2 15

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation