Explain the logic
k=num%10;
sum=sum+k;
num=num/10;
Answers were Sorted based on User's Feedback
Answer / rudrapathi
It is the logic for adding the digits of given number
for example no is 1234
output is 1+2+3+4=10
| Is This Answer Correct ? | 27 Yes | 1 No |
Answer / 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 |
A man has house old expenses 50% And 20& for transport & 15& other expenses & 240 for recreation what will his budgeted salary pla reply interview on 22 Aug 2011
A secret can be told only 2 persons in 5 minutes .the same person tells to 2 more persons and so on . How long will take to tell it to 768 persons ?
20 Answers Cognizant, CTS, DCE,
A sum of money becomes 2.5 times itself at 12.5% simple interest p.a. What should be the period of investment to get this much return?
5.A and B invest Rs.200 and Rs.300 respectively in a business for a period of 3 years, respectively. Then the profit will be divided in the ratio
Dear sir, I am giving Grade B entrance Exam this Oct 09 for RBI.Kindly guide me as to what book would be good to refer for general awareness for RBI. Rgds Gayathri
There are two balls touching each other circumferentially. The radius of the big ball is 4 times the diameter of the small ball.The outer small ball rotates in anticlockwise direction circumferentially over the bigger one at the rate of 16 rev/sec. The bigger wheel also rotates anticlockwise at N rev/sec. what is 'N' for the horizontal line from the centre of small wheel always is horizontal.
please send me last ten year sample paper of clerkical of satate bank of india
0 Answers State Bank Of India SBI,
A man leaves office daily at 7pm A driver with car comes from his home to pick him from office and bring back home One day he gets free at 5:30 and instead of waiting for driver he starts walking towards home. In the way he meets the car and returns home on car He reaches home 20 minutes earlier than usual. In how much time does the man reach home usually??
There are some houses in a street back to back. And they that house behind 10 were 23. How many houses in the street?
if for h hours of work the salary is s and the employee gets x hours of medical leave, then what is the salary/hr ?
one question on: -=+,*=-,/=* etc then 10/5*45=?
What is the calibration procedure for UV Spectrophotometer