kelvins / algorithms-and-data-structures

:abacus: Algorithms and Data Structures in several Programming Languages
MIT License
1.04k stars 256 forks source link

added leibniz formula for calculating pi in c++ #317

Closed pluto-tofu closed 10 months ago

pluto-tofu commented 10 months ago

Description

Added the Leibniz formula for calculating the value of the mathematical constant pi. The value of pi is the sum of a series and the value becomes more and more accurate if we increase the number of terms to be considered.

pluto-tofu commented 10 months ago

@kelvins Thank you , It was a pleasure contributing to this repository.