Explore BrainMass

Explore BrainMass

    C++ Programming (User Defined Functions)

    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);

    © BrainMass Inc. brainmass.com March 4, 2021, 6:10 pm ad1c9bdddf
    https://brainmass.com/computer-science/cpp/programming-user-defined-functions-32852

    Attachments

    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

    ADVERTISEMENT