mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-12 01:34:19 +02:00
Add note about loops C
This commit is contained in:
@@ -231,6 +231,12 @@ int main() {
|
||||
printf("I print\n");
|
||||
}
|
||||
|
||||
// Notes:
|
||||
// Loops MUST always have a body. If no body is needed, do this:
|
||||
for (i = 0; i <= 5; i++) {
|
||||
; // use semicolon to act as the body (null statement)
|
||||
}
|
||||
|
||||
// While loops exist
|
||||
int ii = 0;
|
||||
while (ii < 10) {
|
||||
|
Reference in New Issue
Block a user