Area of circle using constant PI value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akash001
    New Member
    • Jan 2020
    • 1

    Area of circle using constant PI value

    i am beginner in program to explain area of circle constant pi value in python.
  • bharani10
    New Member
    • Jan 2020
    • 1

    #2
    You can use float constant or #define constant to declare PI value.
    1. float constant
    Area of Circle in C
    2. #define Constant
    Area of Circle using #define

    Comment

    • rollerbladegirl
      New Member
      • Jan 2020
      • 69

      #3
      Thank you bharani10. That is a nice start.

      I am only adding to the math part.

      If you want Pi to be more accurate, and if you have learned from the previous post, then you might try including (as you decide) some of this:

      From https://en.wikipedia.org/wiki/Pi

      Fractions: Approximate fractions include (in order of increasing accuracy)
      22/7,
      333/106,
      355/113,
      52163/16604,
      103993/33102,
      104348/33215, and
      245850922/78256779 .

      Please read the linked page from Wikipedia. It explains a lot more of the math.
      .

      Comment

      Working...