Back To C++ User Defined Functions Index
//program to create a function that takes two integers arguments and calculates their sum #include
#include
void sum(int,int); void sum(int a,int b) { int sum; sum=a+b; cout<<"sum of numbers is "<
>a; cout<<"enter value for b"; cin>>b; sum(a,b); getch(); }