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
Help please?
4 Votes
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Game development
0 Votes
Ruby programming?
3 Votes