[Solved] : Question 129031

Read the following code carefully and do as directed:
int main()
{
// Initialising starting number
int num = 1;

int n=7
// Outer loop to handle number of rows
// n in this case
for (int i = 0; i < n; i++) {

// Inner loop to handle number of columns
// values changing acc. to outer loop
for (int j = 0; j <= i; j++) {

// Printing number
cout << num << ” “;

// Incrementing number at each column
num = num + 1;
}

// Ending line after each row
cout << endl;

}

You need to answer following questions.

1. Draw Control Flow Graph for the given code
2. Highlight all regions in the flow graph separately
3. Using cyclometic complexity formula, calculate number of basis path tests.


Expert Answer


Answer to : Question 129031

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?