int main() { int number = 5; // initialize variable std::cout << "Original value: " << number; // assign function return value to the variable number number = cubeByValue( number ); std::cout << "\nThe new value of number is: " << number << std::endl; return 0; }
int main( void ) { int number = 5; // initialize number printf( "The original value of number is %d", number ); // pass number by value to cubeByValue number = cubeByValue( number ); printf( "\nThe new value of number is %d\n", number ); } // end main