¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuitaSesiones 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
Active NavBar
0 Votes
My format is weird
1 Votes
How to reverse a word?
2 Votes
Ayudenme con el error
1 Votes
how to create a game in python
0 Votes
C++
1 Votes
Automation
1 Votes