Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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;
}
- 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.
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started