R – fully online IDE for testing out simple algorithms


I was watching one of those incredibly retarded tv quiz money scams last night as I was reading reddit and they posed the question:

if you wrote down all the numbers between 32 to 287 how may times would you write down the number 6?

So I did some quick maths in my head (there are 11 sixes in each 100, there are two hundreds in between the two numbers and then there are six more = 22 + 6 = 28). The first caller rings up and says 28.

I am not great at maths in my head but I could think of a pretty easy for loop that would figure it out, but there is no way I was going to go through the hassle of installing an IDE on my home machine just to write five lines of code. My question:

Is there a website where I can write simple algorithms like this and compile them and get results all in-browser without having to install any crap or jump through any hoops?

Best Solution

Code Pad supports a lot of programming languages, is free and doesn't require registration.