Explore BrainMass

# C++ Programming (User Defined Functions)

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

3. Consider the following statements:

double num1, num2, num3;
int int1, int2, int3;
int value;

num1 = 5.0; num2 = 6.0; num3 = 3.0;
int1 = 4; int2 = 7; int3 = 8;

and the function prototype:

double cube(double a, double b, double c);

Which of the following statements are valid? If they are invalid, explain why.

a. value = cube (num1, 15.0, num3);

b. cout << cube(num1, num3, mum2);

c. cout << cube(6.0, 8.0, 10.5);

d. cout << cube(num1, num3);

e. value = cube(num1, int2, num3);

f. value = cube(7, 8, 9);

g. value = cube(int1, int2, int3);

https://brainmass.com/computer-science/cpp/programming-user-defined-functions-32852

#### Solution Preview

3. Consider the following statements:

double num1, num2, num3;
int int1, int2, int3;
int value;

num1 = 5.0; num2 = 6.0; num3 = 3.0;
int1 = 4; int2 = 7; int3 = 8;

and the function prototype:

double cube(double a, double b, double c);

Which of the following statements are valid? If they are invalid, explain why.

a. value = cube (num1, 15.0, ...

#### Solution Summary

The expert examines c++ programming for the user function.

\$2.49