mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-21 05:51:31 +02:00
removed break statements from if-then-else
This commit is contained in:
@@ -119,11 +119,11 @@ foreach (int foreach_demo_var in foreach_demo) {
|
|||||||
} // foreach works on any iterable collection
|
} // foreach works on any iterable collection
|
||||||
|
|
||||||
if (a == 0) {
|
if (a == 0) {
|
||||||
break;
|
stdout.printf("%d\n", a);
|
||||||
} else if (a > 1) {
|
} else if (a > 1) {
|
||||||
stdout.printf("%d\n", a);
|
stdout.printf("%d\n", a);
|
||||||
} else {
|
} else {
|
||||||
break;
|
stdout.printf("A is less than 0");
|
||||||
} // if-then-else
|
} // if-then-else
|
||||||
|
|
||||||
switch (a) {
|
switch (a) {
|
||||||
|
Reference in New Issue
Block a user