Computer Science, asked by choutu5069, 11 months ago

Write a JavaScript code to display a even number of 2 to 20

Answers

Answered by Anonymous
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