Follow Us

LightBlog

Breaking

Monday, February 27, 2017

Write a program to add two number using cpp with return type.

 Write a  program to add two number using cpp with return type.

#include<iostream.>
using namespace std;
int add(int ,int);
int main()
{
int a,b;
cout<<"enter two number ";
cin>>a>>b;
cout<<"sum is   "<<add(a,b);

}
int add(int x,int y)
{
return(x+y);

}

out put


No comments:

Post a Comment