Created
September 27, 2016 02:54
-
-
Save jeremyyeo/9160121189fddfda7527fea30d95b97d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x <- 1 | |
for (i in 1:10) { | |
while (x < 5) { | |
print(x) | |
x <- x + i | |
if (x >= 5) { | |
break | |
} | |
} | |
if (i >= 5) { | |
print(paste("I have broken out of the while loop", i, "times")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment