csc1253project3

csc1253project3 - Iteration CSc 1253: Project # 3...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Iteration CSc 1253: Project # 3 Approximating e Using a Power Series Out: 9/21 Due: 10/10 by 11:50 PM Learning Objectives Using Iteration More on Writing Interactive Programs Definition 1. The number e is irrational; that is, it cannot be expressed as a ratio of integers. Furthermore, it is transcendental; it is not a root of any non-zero polynomial with rational coefficients. The numerical value of e truncated to 20 decimal places is 2.71828182845904523536. The power series expansion of the function f ( x ) = e x is given by the expres- sion: e x = summationdisplay i =0 x i i ! = 1 + x + x 2 2! + x 3 3! + x 4 4! + Approximating e . 1 using the first five terms of this power series gives, e . 1 = 1 + 0 . 1 + . 01 2 + . 001 6 + . 0001 24 = 1 . 10517 The e Approximation Program Write a program consisting of only the main function, called e approximator.cpp . When your program begins, the user is prompted to enter a number x rep- resenting the power to which e is to be raised and a positive integer n repre- senting the number of terms to be used in the approximation. Your program should then compute the power series approximation of...
View Full Document

This note was uploaded on 06/20/2011 for the course CSC 1253 taught by Professor Staff during the Fall '08 term at LSU.

Page1 / 3

csc1253project3 - Iteration CSc 1253: Project # 3...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online