DISPLAY NUMBERS BETWEEN 1 TO N USING DO WHILE STATEMENT - Carrier Study

Breaking

Home Top Ad

Responsive Ads Here

Friday, May 25, 2018

DISPLAY NUMBERS BETWEEN 1 TO N USING DO WHILE STATEMENT

import java.util.*;

class disnums
{
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=1;
do
{
system.out.println(i+ " ");
i++;}
while(i<=n)l
}
}

No comments:

Post a Comment