Generate digits of π and root(2) up to any given precision (number of decimal digits after the decimal point). Your implementation must be limited, in principle, only by the hardware (speed and memory) on which your code is running.
Workes for every base but the answer is printed in same base so base 10 is hard coded.
INPUT :
- 1 or 2 for (1) root(2) and (2) for π
- Precision integer
- Base on which the above is calculated (although 10 is hardcoded).
Output : Value of Root(2) or π depanding on the input and in base 10 printed upto the precision # of digits.