-1

Can anybody tell me how can i calculate x decimal numbers of pi, if my input is 2 than output should be this 3.14 if my input is 4 then output is 3.141. I have tried code like this but doesnt work how i want.

```
pi +=3+4/(k*l*m) - 4/(a*b*c); //+ 4/(6*7*8) - 4/(8*9*10) + 4/(10*11*12) - 4/(12*13*14)+4/(15*16*17);
```

thanks in advance for help.