Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Finding the sum of an arithmetic progression using a loop is terrifying
This is as simple as it gets
s
is not declared in thewhile
loop.I'm confused. How does the return keyword have access to the s variable if the s variable is locally scoped to the while statements code block?
and now?
Nice solution, did not think about using while loop!
I got 0 for finishing it in PHP. It deserves a 8kyu in PHP and even that is too much
I used this to test
This comment is hidden because it contains spoiler information about the solution
Why num % i is NaN? It can't be compared with 0
what a genius!
out of my league :(