Quote:
I don't know where to start. We never learned this in class so it makes no sense to me.
It actually makes sense.
A possible algorithm is described by the following example:
Suppose you're asked to provide two decimal digits.
Starting from
pi = 3.141592653589793
take just the integer part, namely
3
then multiply the remaining number by
10
, obtaining
1.41592653589793
take the integer part, namely
1
make another step
4.1592653589793
obtaining
4
.
The result is
3.14