Answer to Question #261269 in C++ for hii

Question #261269

Let us assume the program below runs smoothly, identify all function arguments in each function call in exact order and separate each argument in just a comma:


int getCube(int number){ return number * number * number;}

char getLetter(double n) {if(n>50) {return'0';} return 'X'}

double getThis(int num){return 1.0;}

int main(){

    int n1 = 78, n2 = 55;

    double vall = 123.56, val2 = 784.59;

    cout << getLetter(val1) << "-" << getLetter(val1);

    cout << getLetter(val2) << "--" << getThis(val2);

    cout << getCube(123) " " << getCube(321) << "\n";

    cout << getThis(val1);


    return 0;

}




What is Answer:


1
Expert's answer
2021-11-07T01:57:12-0400
#include <iostream>


using namespace std;


int getCube(int number) { return number * number * number; }


char getLetter(double n)
{
    if (n > 50)
    {
        return '0';
    }
    return 'X';
}


double getThis(int num) { return 1.0; }


int main()
{
    int n1 = 78, n2 = 55;
    double val1 = 123.56, val2 = 784.59;
    cout << getLetter(val1) << "-" << getLetter(val1);
    cout << getLetter(val2) << "--" << getThis(val2);
    cout << getCube(123) << ", " << getCube(321) << "\n";
    cout << getThis(val1);
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS