Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active March 4, 2022 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McLarenCollege/f2a3b4e8e8fd795df69ea5234c965ba2 to your computer and use it in GitHub Desktop.
Save McLarenCollege/f2a3b4e8e8fd795df69ea5234c965ba2 to your computer and use it in GitHub Desktop.
Exercise : 100 to 70

Use a while loop to print out all the numbers from 100 to 70 in descending order skipping every second number.

OUTPUT

100
98
96
.
.
.
.
70

Structure of a While Loop

while (condition) {
  // statements
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment