Program to add 2 integer using function

#include
#include
main()
{
int a,b,c;
clrscr();
cout<>a;

cout<>b;

int sum(int,int);
c = sum(a,b);

cout<<"n Addition of "<<a<<" and "<<b<<" is <<c;
getch();
}
int sum(int x,int y)
{
int z;
z=x+y
return(z);
}

Tags:

Leave a reply