Question

Subject: System Test & Verification Draw the graph that represents this section of code             X=1...

Subject: System Test & Verification

  1. Draw the graph that represents this section of code

            X=1

            While x > y

                  Y = b +1

                  If (y = = 0)

                       break

                 else

                       y = y*2

                       X = X+1          

                 end

            end                 

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

here blue edges are for last use of data and black edges are for computed from

code

    1.            X=1
    2.                       While x > y
    3.                            Y = b +1
    4.                            If (y = = 0)
    5.                                break
                                else
    6.                                y = y*2
    7.                                X = X+1       
                                end  
                            end

Explanation

here we will call variables by their number in graph shown

first initialixe x1=1

then control transfers to x2 and condition is check

then control transfers to y3 and result is computed by b4 and 1_5
then again condition check at y6
if true then nothing
else    control transfers to y7
        y7 is computed ad y3 and 2

        then control transfers to x9
        and x9 is computed by x2 and 1

end

2 X b Y 1 6 Y Y 2 X

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Subject: System Test & Verification Draw the graph that represents this section of code             X=1...
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
ADVERTISEMENT