Explain the logic
k=num%10;
sum=sum+k;
num=num/10;
Answer Posted / bariki shanmukha[anantapuram,m
I wil take 3 variables such as,sum=0,k,num[IT REPRESENTS
GIVEN NUMBER BY THE USER].
itr1 itr2 itr3 itr4 itr5
k : - 4 3 2 1
sum: 0 4 7 9 10
num: 1234 123 12 1 0
like that exucution wil b starts which is above mentioned.
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What is the 8th term in the series 1, 4, 9, 18, 35, 68, . . .
25 stations ,24 stations are inbetween- - - - - how many tickets should be required.
A rectangular tank can hold m litres of milk. Find how many litres of milk can a tank hold when all its dimensions are doubled?
find 70.56/ 11.2 =?
There are 6 consecutive numbers P, Q, R, S, T, U, not necessarily in that order. Given that, Q is 2 less that P, P is 3 less that T and R is 2 less than S, arrange them in an ascending order.
write a five digit number , which will be having two prime numbers, and some two more conditions,like 1st digit greater than 2nd etc its easy(remember one is not a prime number,most people don mistake taking 1 as prime number)
Using the digits 1,5,2,8 four digit numbers are formed and the sum of all possible such numbers.
how would you connect 8 dots with 3 lines.
If DBMDVUUB = CALCUTTA Then BOMBAY = ?
A can have a piece of work done in 8 days, B can work three times faster than the A, C can work five times faster than A. How many days will they take to do the work together ?
how can i improve myself in solving apptitude questions, guide and help me with some kind of tips.suggest me books too.so that i can get betterment in solving apps
A bus started from the bus stand at 8Am and after staying 30 minutes at a destination return back to the bus stand. The Destination is 27 miles from the bus stand . The Speed of the bus is !8mph . In the return journey the bus travels with 50% fast speed. At what time it is return to the bus stand
A speedboat whose speed is 15 kmph in still water goes 30 kmph downstream and comes back in a total of 4hrs 30min. What is the speed of the stream in kmph?
in a mixture, R is 2 parts, S is 1 part. in order to make S to 25% of the mixture, howmuch R is to be added
1/3 of girls , 1/2 of boys go to canteen. What factor and total number of classmates go to canteen.