EG H167          1:30 Sec.          Winter 2001          Daily Assignment D4Advanced

 

For the D4 Advanced assignment:

 

1.          Complete the regular D4 assignment which exercises your skills in performing computer arithmetic.

 

 2.          Include the following calculations as if these statements below appeared after the last arithmetic statement in the regular D4 assignment.  Note that the value to be filled in the blank should the final value when execution of the repetition structure is finished.

 

 

          for (d = e ; d <= s ; d++)   f += q ;        /* f =                   */

 

        for (d = s ; d > e ; d--)   f -= s ;                    /* f =                   */

 

        for (d = e, f = 100 ; d < s ; d++, q--)

        {      

 

f += q ;                                             /* f =                   */

 

                h = h * d ;                                       /* h =                  */

 

        }