P. 1 - PowerPoint PPT Presentation

1 / 2
About This Presentation
Title:

P. 1

Description:

Problem B11 calculates the values of cosine for angles between 0 and 90 ... the Taylor Series expansion of the sine function is given in the problem statement. ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 3
Provided by: RickFr6
Category:
Tags: sine

less

Transcript and Presenter's Notes

Title: P. 1


1
Problem B11
  • Problem B11 calculates the values of cosine for
    angles between 0 and 90 degrees.
  • You are provided with a partial program that has
    a main() function. You are to write
  • the function mycos(x, terms)
  • the function myfactorial(n)
  • Prototypes for mycos() and myfactorial() are
    provided
  • The main program will compare the calculations of
    your mycos() function with the cos() function
    from the math.h library.

2
Problem B11
  • The algorithm for the Taylor Series expansion of
    the sine function is given in the problem
    statement.
  • The algorithm for the factorial function is
  • if (n 0) (n 1) factorial 1
  • else
  • factorial 1
  • for (i 1 i lt n i) factorial factorial
    i
  • return factorial
Write a Comment
User Comments (0)
About PowerShow.com