Program to add 2 integer using function

  • Post author:
  • Post category:c++
  • Post comments:0 Comments

#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);
}

Leave a Reply