Calculate pi using BBP formula and GMP library. Choose the desired number of digits and the base of your number system.
A faster algorithm is the Chudnovsky algorithm, especially when implemented with binary splitting, but that would be much harder to code. Since this is meant to be a simple and fun GMP program, I am using the BBP formula instead.