Question: Question 1: Lets consider the following program: Provide at least 4 test cases. #include using namespace std; int main() { int x, y; cout <

Question 1:

Lets consider the following program: Provide at least 4 test cases.

#include

using namespace std;

int main() {

int x, y;

cout << Please enter an integer value: ;

cin >> x;

if (x >= 15)

{

x++;

y = x + x - 7;

}

else

{

x = x * 2;

y = x * x + 7;

}

cout << x = << x << y = << y << endl;

system(pause);

return 0;

}

  1. Use the step over option to trace the execution of the program for an input value of 15. Copy and paste 2 screenshots showing the execution trace inside both the true and false sections of the if statement for this value.
  2. Repeat for input value 14.

    Test #

    Valid / Invalid Data

    Description of test

    Input Value

    Actual Output

    Test Pass / Fail

    1

    Valid

    2

    Valid

    3

    Valid

    4

    Valid

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!