Back To C++ User Defined Functions Index
//program to create a function that finds volume of a box (width, depth and height of box are passed to function as arguments) #include
#include
void volume(int,int,int); void volume(int width,int depth,int height) { int vol; vol=width*depth*height; cout<<"volume of box is "<
>w; cout<<"enter depth of box"; cin>>d; cout<<"enter height of box"; cin>>h; volume(w,d,h); getch(); }