Sunday, April 19, 2009

I just wanna for the syntax of java using loops where the numbers will decrease?

the output should be





12345


1234


123


12


1





please help i really wanna learn this java program and i dont have anyone i can depend please help...thanks

I just wanna for the syntax of java using loops where the numbers will decrease?
For this program u just need to do this:


For example x =12345;





while(x/10!=0){


System.out.println(x);


x=x/10;


}





That%26#039;s all:)
Reply:for(int j = 5; j %26gt; 0; j--){


for(int i = 1; i %26lt;= j; i++){


System.out.print(i);


}


System.out.println();


}
Reply:for(int x = 5; x %26gt; 0; x--){


for(int y = 1; y %26lt;= j; y++){


System.out.print(y);


}


System.out.println();


}



tanning

No comments:

Post a Comment