Write for, dowhile, and while statements to compute the following sums and products. a. I + 2
Fantastic news! We've Found the answer you've been seeking!
Question:
Write for, do—while, and while statements to compute the following sums and products.
a. I + 2 + 3 + ….. + 100
b. 5 + 10 + 15 + ….. + 50
c. 1 + 3 + 7 + 15 + 31 + ……… + (2 20 — 1)
d. 1 + 1/2 + 1/3 + 1/4 + ………. + 1/15
e. 1 x 2 x 3 x…….x 20
f. 1 x 2 x 4 x 8 x…..x 2 20
Related Book For
Modeling the Dynamics of Life Calculus and Probability for Life Scientists
ISBN: 978-0840064189
3rd edition
Authors: Frederick R. Adler
Posted Date: