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.
Understood. There are other approaches that have linear and even constant run times. Read up on triangular numbers, for example.
Yes. It's equivalent to
while ( true ) { ... }
ordo { ... } while ( true );
, but without block level scoping. When those loops are compiled into machine code, they're reduced to an unconditional jump instruction, i.e.goto
.Why are you trying to avoid a nested loop anyway?
FYI, when you post code to discourse, bracket it with block code formatting so it's easier to read.
Did you forget to include
using System;
statement?Not an issue. Your code is causing this.