Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Construct a control flow graph for the program using basic blocks with statement numbers. main() { int sum, i, j; 1. sum = 0; 2.

Construct a control flow graph for the program using basic blocks with statement numbers.

main() {

int sum, i, j;

1. sum = 0;

2. i = 1;

3. while (i <= 5){

4. scanf ("%d", &j);

5. if (j < 0)

6. continue;

7. sum = sum + j;

8. if (sum > 10)

9. break;

10 i = i + 1;

11. }

12. printf ("sum is %d", sum);

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago