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

Leave a Comment

Your email address will not be published. Required fields are marked *

To Resolve this issue at just 5$ from ServerExpert

https://serverexpert.io/

For Hosting please visit Hostingwebsite.io

You have Successfully Subscribed!

Open chat