Dyskusje Q&A
Guys please help me with these (assignment) :
-create  a function "manipulate_data" that does the following;
1.accepts as the first parameter astring specifying the data structure to be used e. g a list. 
2.accepts as the second parameter the data to be manipulated based on the data structure specified e.g [1,4,9,16,25] for alist data structure. 
 0 głosów
 7 odpowiedziCan 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 głosów
 8 odpowiedzi9
 2 głosów
 6 odpowiedziPopularne dzisiaj
Beginner question
 0 Votes
I need help to solve this
 0 Votes
Remove
 0 Votes
Project
 0 Votes
Engineer Cloud
 0 Votes
Lua?
 1 Votes