Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grátisQ&A Discussões
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 Voto
8 RespostasQuente hoje
Plz help me to learn coding
1 Votes
How to change the font
1 Votes
CSS TRANSITION
1 Votes
Related to Tuple and list
1 Votes
Front-end or Back-end
0 Votes
Code suggestions
0 Votes