Question: In the program presented below, use as a reference the numbering of the instructions in the column on the left to answer the following: By

In the program presented below, use as a reference the numbering of the

instructions in the column on the left to answer the following:

By what instructions does this program run when it runs? In what order?

Suppose that a value of 10 is entered into the input variable when the program reaches the

instruction cin on the line (8).

Be careful to identify exactly in which order C ++ executes the instructions

of this program.

Line

#include

using namespace std;

void func1() (1)

{

cout << "Pude hablar con Juan. "; (2)

}

void func2(int input) (3)

{

cout << "Vi a Juan a las " << input << ". "; (4)

}

int main() (5)

{

int input; (6)

cout << "Enter a number: "; (7)

cin >> input; (8)

if (input < 10) (9)

{

func1(); (10)

func2(input); (11)

}

else

{

func2(input); (12)

func1(); (13)

}

return 0; (14)

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!