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