Write a JavaScript code to display a even number of 2 to 20
Answers
Answered by
4
import java.util.*;
public class Even
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int m=2;
do
{
System.out.println("The even numbers are="+m);
m=m+2;
}
while(m<=20 && m%2=0);
}
}
Similar questions
Social Sciences,
5 months ago
Math,
5 months ago
English,
11 months ago
Math,
11 months ago
Math,
1 year ago