Question

Software Testing Question Program P3 CFG. a) Identify the basic blocks for the following program P3...

Software Testing Question

Program P3 CFG.

a) Identify the basic blocks for the following program P3 written in pseudo-code.

b) Draw the control flow graph.

Program P3

1) integer A, B; 2) input (A);

3) if (A > 7)

4) {

5) B = 1;

6) } // end if A>7

7) else

8) {

9) B = 2;

10) if (A < 2)

11) B = 3;

12) } // end else A≤7

13) while (int i=1; i<=A; i++)

14) {

15) if (A<4)

16) B = B + 4;

17) else

18) B = B - 5;

19) } // end for loop

20) output (A,B);

21) end;

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Software Testing Question Program P3 CFG. a) Identify the basic blocks for the following program P3...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT