labels, goto

This commit is contained in:
pommicket 2022-02-13 12:51:21 -05:00
parent a26f0d52d9
commit 5dba28b8ba
2 changed files with 38 additions and 10 deletions

View file

@ -23,17 +23,15 @@ long gcd(long a, long b) {
return b;
}
int f() {
lb: goto lb;
}
int main(int argc, char **argv) {
int exp = 0;
int i;
int j;
for (i = 0; i < 10; ++i) {
for (j = 0; j < 10; ++j) {
if (j >= i) break;
exp += 1;
}
if (i >= 5) break;
}
lb:
exp++;
if (exp < 10) goto lb;
return exp ;
}