Note: We need an author for this blog. Willing people contact Us......

Thursday, 17 November 2016

Dev C++, Example 4

# include <iostream>
using namespace std;
int add (int,int);
int main ()
{
int  a,b,sum;
cout<<"Enter 2 numbers ="<<endl;
cin>>a>>b;
sum=add (a, b);
cout<<"Sum is ="<<sum<<endl;
return 0;


}

int add(int a, int b)
{
int add;
add = a+b;
return add;
}

No comments:

Post a Comment

Contact us

Name

Email *

Message *