Welcome back to Monday. Hope everyone enjoyed the first week of Sunday football!
Today's problem is to create a function that takes in a number and outputs that digit of pi. For example, if the function received 2 it would output 4.
Welcome back to Monday. Hope everyone enjoyed the first week of Sunday football!
Today's problem is to create a function that takes in a number and outputs that digit of pi. For example, if the function received 2 it would output 4.
Permalink: http://problemotd.com/problem/pie/
Content curated by @MaxBurstein
Comments:
Anonymous - 10 years, 3 months ago
today as lambda:
\x -> mod (pi * 10x) 10
reply permalink
malboy - 10 years, 3 months ago
This is what I came up with in C#. Probably not the fastest/most efficient method, but whatevs.
reply permalink
Anonymous - 10 years, 3 months ago
reply permalink