Buy links or Sell links @ Text add links & Njoy

Bluejava

Bluejava

 
 
 
Java Exercise

create a loop to display a user given number 10 times ?

1)
 class qwe
{
qwe(int a)
{
for(int x=1;x<=a;x++)
{
System.out.println(x);

}
}
}

2)
class bsd
{
int x=1;
bsd(int a)
{
while(x<=a)
{
System.out.println(x);
x++;
}
}
}

3)
class asdf
{
asdf(int a)
{
int x=1;
do
{
System.out.println(x);
x++;
}
while(x<=a);
}
}

Done by Saurabh Kamath with the help of Sujeet Gupta

Enter supporting content here

For more info contact us at saurabhkamath_8@hotmail.com
 
Site edited with the help :