F&A Diskussionen
Class competition
0 Stimmen
4 AntwortenCan 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 Stimmen
8 AntwortenHeute heiß
Guys help please
1 Votes
Python question
2 Votes
Are websites hackable?
1 Votes
Python
1 Votes
TICTACTOE
0 Votes
Error
0 Votes
C# and sql
1 Votes
What course to take for AI?
0 Votes
What's an unsigned int?
0 Votes