Question: public class EvenNumbers { var i = 1; while(i
public class EvenNumbers {
var i = 1; while(i<=100) { if(i%2==0) printf("%d ", i); i++; }
}
Instructions
This exercise requires you to write a while statement that prints all even numbers between 1 and 100 to the screen.
Type the declaration, element, document head, and
element. Use Even Numbers as the content of the element.
Create a script section with a while statement that prints all even numbers between 1 and 100 to the screen.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
