Adding two numbers using functions

This program adds two numbers using functions

[code='cpp']#include
int add(int,int);
void main()
{
int num1,num2,res;
cout<>num1>>num2;
res=add(num1,num2);
cout<<"The sum is "<<res;
}

int add(int x,int y)
{
int s=x+y;
return(s);
}
[/code]

Comments are closed.