Write a JavaScript code to display even numbers from 1 to 100 using any looping statement.
Answers
Answered by
3
Answer:
class even
{
public static void main(String args[])
{
int i;
System.out.println("EVEN NUMBERS FROM 1 TO 100:");
for(i=2;i<=100;i+=2)
{
System.out.println(i);
}
}
}
Explanation:
Similar questions