next up previous
Next: About this document ...

ESC 251 HW 17 Due: Oct. 13

Reminder: All counting variables must be of INTEGER datatype.

1)
(3 pts) Write a program that will tabulate

f(x) = x3 - 2.1x + 4.6 + e-x2

for $x \in [-2,2].$ You should read in the value of n. Run your program to generate the table for n = 5, 10, 20.
2)
(5 pts) Write a program that will compute n! given the value of n. Test your program for n = 0, 7, 11, 15. Remember that 0! = 1. Does your program always give you the correct answer?




2017-10-11