mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
Add note about loops C
This commit is contained in:
parent
f1b1fd8e2e
commit
b0c5ca0a1c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user