Skip to content

Instantly share code, notes, and snippets.

@ayeshLK
Created January 4, 2022 20:25
Show Gist options
  • Save ayeshLK/b1b12637bff1ea865102ce77f1ed955e to your computer and use it in GitHub Desktop.
Save ayeshLK/b1b12637bff1ea865102ce77f1ed955e to your computer and use it in GitHub Desktop.
function printEvenNumbersInRange(int range) {
int n = 1;
// run this loop until `n` is greater than or equal to `range` value
while n < range {
if n % 2 == 0 {
io:println(n);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment