DISPLAY EVEN NUMBERS LIST BETWEEN 1 TO N - Carrier Study

Breaking

Home Top Ad

Responsive Ads Here

Friday, May 25, 2018

DISPLAY EVEN NUMBERS LIST BETWEEN 1 TO N

import java.util.*;
class even number
{
public static void main(string args[])
{
int i,n;
scanner os=new scanner( system.in);
system.out.println("enter n value");
n=os.next int();
i=2;
while (i<=n)
{
system.out.println(i+" ")

i=i+2;
}
}
}

No comments:

Post a Comment