Explain the logic
k=num%10;
sum=sum+k;
num=num/10;
Answer Posted / 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 |
Post New Answer View All Answers
A man shows his friend a woman sitting in a park and says that she the daughter of my grandmother's only son. What is the relation between the two
There are 5 red shoes, 4 green shoes. If one drasw randomly a shoe what is the probability of getting redshoe is
In 1978, a kg of paper was sold at Rs25/. If the paper rate increases at 1.5% more than the inflation rate which is 6.5% a year, then what will be the cost of a kg of paper after 2 years?
What kind of questions are there in Harbinger Aptitutde test paper(for 2011)and their paper pattern?Plz reply urgently.
There are 150 weights .Some are 1 kg weights and some are 2 kg weights. The sum of the weights is 260.is the number of 1kg weights?
What is the average candidates who appeared from state q during the given years?
2 oranges,3 bananas and 4 apples cost Rs.15 . 3 ornages 2 bananas 1 apple costs Rs 10. what is the cost of 3 oranges, 3 bananas and 3 apples
Rajdhani Express starts from Delhi at 12:00 pm and reaches Chandigarh at 2:30 pm and Doronto Express starts from Chandigarh at 12:15 and reach at Delhi at 2:15 . What will be the time when both the trains will cross each other?
There are 5 questions based on a murder story.the questions concentrate on the seating arrangements of people mentioned.
sir plz send the rrb exam question papers my emailid is abhilasha.bollepalli@gmail.com
Explain the Binomial theorem?
A man travelled from the village to the post-office at the rate of 25 kmph and walked back at the rate of 4 kmph. If the whole journey took 5 hours 48 minutes, find the distance of the post-office from the village
In a mixture, R is 2 parts and S is 1 part. In order to make S to 25% of the mixture, how much of R is to added?
In a party man & his wife ,and there r 2 son with their wives, and every son has 4 children in his family .how manyperson r in party.
In a two-dimensional array, X (9, 7), with each element occupying 4 bytes of memory, with the address of the first element X (1, 1) is 3000, find the address of X (8, 5).