Sesiones de PyR
Can someone explain this code to me....
class ReverseNumberDemo
{ public static void main(String args[]) {
int num=123456789;
int reversenum =0;
while( num != 0 ) {
reversenum = reversenum * 10;
reversenum = reversenum + num%10;
num = num/10; }
System.out.println("Reverse of specified number is: "+reversenum);
}
}
the thing I don't get is the reversenum part......isn't reversenum=0 so wouldn't reversenum*10=0
0 Votos
8 RespuestasEn tendencia hoy
Checking personal activity
0 Votes
Help
0 Votes
Where is the error
0 Votes
Full form of HTML
0 Votes
Which one is better?? And why??
1 Votes
Use of global function in c
0 Votes
Please help me
0 Votes