diff --git a/Prog/Loops.md b/Prog/Loops.md index 32b1ed3..d72f255 100644 --- a/Prog/Loops.md +++ b/Prog/Loops.md @@ -3,7 +3,8 @@ In C#, loops are called iteration statements. We need to master both, recursion - for - foreach > For the rest of the document, something between `<>`is something mandatory and something between `[]`is something optionnal -## While loop +## Iteration statements +### While loop ```cs while () { @@ -24,7 +25,7 @@ unit SumWhile(unit n) return loop; } ``` -### Iteration statements - do (..) while +#### Iteration statements - do (..) while ```cs do { @@ -46,7 +47,7 @@ uint SumDoWhile(uint n) } ``` -## For loop +### For loop ```cs for ([initialize]; [condition]; [iterator]) { @@ -99,10 +100,8 @@ foreach (char c in test) ## Jump statements Jump statements is something that can change the behaviour of a loop inside itself. -It's possible to change the behaviour of the loops using the following keyworkds: +It's possible to change the behaviour of the loops using the following keywords: - ``break`` - ``continue`` - ``return`` -> ⚠️ It's not a good idea to use them, but rather to rework your loop correctly instead - -### Jump statements - break \ No newline at end of file +> ⚠️ It's not a good idea to use them, but rather to rework your loop correctly instead \ No newline at end of file