In the example shown in the previous segment, the arguments are all
constant expressions, but, of course, arguments can be variable
expressions, such as height
, width
, and length
, or
expressions containing operators, such as length + stretch
:
#include// Definition of box_car_volume function will go here main ( ) { int height = 11, width = 9, length = 40, stretch = 10; cout << "The volume of the standard box car is " << box_car_volume (height, width, length) << endl << "The volume of a stretched box car is " << box_car_volume (height, width, length + stretch) << endl; }