Problem Solving with Computers (CS 135)
Dr. William J. Joel, WS 110, 7-9353

Quiz No. 5

 

1

Create a flowchart for each of the following loops. For each loop, state the number of times the body is executed. (40 points)

(a) X = 0
     For C = 0 to 10
          X = X + C2
     Next

(b) Z = 0
     Do while Z2 < 4
          Z = Z + 0.1
     Loop
2
Given a For loop where the initial counter value is greater than the final value, and the step is positive, state whether or not the body of the For loop will be executed. Include a fairly detailed explanation for your answer.
(40 points)
3
State under what conditions you might need to create a new function for Excel as opposed to using basic arithemtic operations in a formula.
(20 points)