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 Professional Online IDE: AWS Cloud9 The online IDE combines a code editor with a terminal and powerful debugging tools. Cloud9 also features a pair programming mode similar to VS Live share allowing collaborative remote programming in teams.
Testing an algorithm One way to test short programs is to do what is known as a dry run using paper. A dry run involves creating a trace table , containing all the variables a program contains. Whenever the value of a variable changes, the change is indicated in the trace table.
Code Pad supports a lot of programming languages, is free and doesn't require registration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With