Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урокОбсуждения
int x = 10; x = ;
-3 голосов
7 ответов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 ответовJava programming loop statements
0 голосов
2 ответовАктуальное сегодня
Media on HTML
0 Votes
Is Sololearn better or Mimo.org?
2 Votes
How to cast in python
0 Votes
Python
0 Votes
Java project
0 Votes
JavaScript
0 Votes
Editor HTML
0 Votes
What happens with this code?
0 Votes