Share your repls and programming experiences

← Back to all posts
First n digits of pi
StevenWang2 (7)

In honor of the upcoming pi day this year, this program will calculate the first n digits of pi (user input)

This program is a modified (and simplified) version of one found on Wikipedia here: https://en.wikipedia.org/wiki/Chudnovsky_algorithm

Note: After 300+ digits, the program will become extremely slow to calculate the digits