Discussions Q&R
int x = 10; x = ;
-3 Votes
7 RéponsesCan 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 Vote
8 RéponsesAujourd'hui en vedette
Way to learn programming...
2 Votes
Help me to solve this problem.
0 Votes
Flowing Words
0 Votes
Hallowin candy solution
0 Votes
How to move up in the leagues?
1 Votes
how to make my scanner work😆
0 Votes
Help
2 Votes
Python challenge
0 Votes
Javascript
1 Votes
Cool Projects for Python
0 Votes