Обсуждения
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 голосов
8 ответовАктуальное сегодня
Ошибка в приложении Sololearn
1 Votes
NEO V2.0
1 Votes
Best language?
0 Votes
you con help mi
1 Votes
Learn - multiple choice course questions display in one box making it impossible to continue
1 Votes
Sql practice
0 Votes