Make sure to follow the general instructions for performing and submitting homework.
using assignments, while-loops, and conditionals. You may assume that E1 and E2 are pure integer expressions with no side effects, and that SL does not change the value of i. But, you must insure that your code will execute successfully under all reasonable circumstances. In particular, if E1>E2, the for-loop must be equivalent to doing nothing. And, you must never assign a value to i that is less than E1 or greater than E2, because that might cause an overflow if the loop is running right up to the limit of the range of i. This problem is based on 3.5 on page 96 of the text.for i := E1 to E2> do SL endfor
SL1; if A then goto l; SL2; l: SL3
SL1; l: SL2 if A then goto m; SL3; if B then goto l; m: SL4
SL1; while A do SL2; if B then goto l; SL3 end while; SL4; l: SL5
I am only interested in really well thought out and clearly presented solutions to this problem. Please don't just stab at it in the wild hopes of picking up points.
Find your own example of a flowchart that cannot be implemented using if and while, in the sense of problem 3.13 on page 99 of the text. Interpreting the ground rules for the implementation is part of the problem. You don't need to write a mathematical proof, but you must be convincing. Hint: look for a graphical property shared by all flowcharts of structured programs. A convincing argument takes 3-5 sentences.