Skip to content

Instantly share code, notes, and snippets.

@appoll
Created November 18, 2022 18:28
Show Gist options
  • Save appoll/4e9a867b4471724dbe1619547350273d to your computer and use it in GitHub Desktop.
Save appoll/4e9a867b4471724dbe1619547350273d 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=0; i<=10; i+=1){
console.log(i);
console.log("I am at i = " + i);
}
// E2. Iterate from 0 to 50; Print "##" for even numbers and "!!" for odd numbers;
// E3. Print all numbers from 10 to 0 in descending order;
// 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