Skip to content

Instantly share code, notes, and snippets.

@appoll
Created February 21, 2022 17:17
Show Gist options
  • Save appoll/4621b6b14e142e124f2065c8d207ce30 to your computer and use it in GitHub Desktop.
Save appoll/4621b6b14e142e124f2065c8d207ce30 to your computer and use it in GitHub Desktop.
// E1. Print all even numbers between 10 and 20 (including 10 and 20). An even number is a number
// x for which the following is true: x % 2 === 0
for (i = 10; i < 21; i++ ) {
}
// E2. Iterate from 0 to 50; Print "##" for even numbers and "!!" for odd numbers;
for (i = 0; i < 51; i++ ) {
}
// E3. Print all numbers from 10 to 0 in descending order;
for (i=10; i >= 0; i--) {
console.log(i);
}
// E4. Find the max number in the interval [10,100] which is divisible with 3, 4 and 5;
// E5. Print only the first 3 even numbers in the interval [10, 100];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment