1 / 14

Understanding Mathematical Functions in Programming: Area and Circumference Calculations

This chapter delves into the implementation of mathematical functions in programming, taking examples from geometry to illustrate key concepts. It covers the calculation of areas and circumferences of circles and the computation of the rim area of a flat washer. The chapter includes detailed figures to aid understanding, such as the square root function as a "black box" and formulas for calculating unknown sides of triangles. These mathematical principles are essential for developing problem-solving skills and designing programs, particularly in C programming.

efrat
Télécharger la présentation

Understanding Mathematical Functions in Programming: Area and Circumference Calculations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 3:Math Functions Adapted from Problem Solving & Program Design in C Sixth Edition By Jeri R. Hanly & Elliot B. Koffman

  2. Figure 3.2 Outline of Program Circle

  3. Figure 3.3 Calculating the Area and the Circumference of a Circle

  4. Figure 3.3 Calculating the Area and the Circumference of a Circle (cont’d)

  5. Figure 3.4 Computing the Rim Area of a Flat Washer

  6. Flat Washer Program

  7. Flat Washer Program (cont’d)

  8. Figure 3.6 Function sqrt as a “Black Box”

  9. Figure 3.7 Square Root Program

  10. Figure 3.7 Square Root Program (cont’d)

  11. Common Mathematical Library Functions

  12. Common Mathematical Library Functions

  13. Example Formula to calculate unknown side “a” of a triangle a2=b2 + c2 – 2bc cosα

  14. Triangle with Unknown Side a After defining a, b, c, PI and alpha a = sqrt(pow(b,2) + pow (c,2) – 2*b*c* cos (alpha*PI /180.0));

More Related