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