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
In which year will the 21st century begin?
One Train Travels 200m From A To B With 70 Km/Ph And Returns To A With 80kmph, What Is The Average Of Their Speed?
what is the syllabus for group-1 and upsc exam for ias also specify the age limit for both appsc and upsc exams. is there any age relaxation for divorced women.
When the angle a, b, c, d are given find ‘x’?
Find the speed of the boat in still water if the river runs at 4 km/hr. The time taken by a Suresh to row the boat upstream is 3 as the time taken by him to row it downstream.
A man, a woman, and a child can do a piece of work in 6 days. Man only can do it in 24 days. Woman can do it in 16 days and in how many days child can do the same work?
What would be the rank of the word LABOUR in the dictionary if all the possible permutations of the alphabets of LABOUR are done?
Two trains 100 meters and 120 meters long are running in the same directions with speed of 72 km/hr and 54 km./hr. in how much time will the first train cross the second?
In a storage stall of 5x3x2inch.How many blanks of size 2x1x1inch can be stored..
The cycle has following specifications: The rear derailer is on the 14 tooth gear and the front derailer is on the 52 tooth gear. The rear gear has 14 teeth. The diameter of the rear wheel is 27". If a cyclist pedals at 75 revolutions per minute, then what will be the speed achieved?
in how many ways can a lock be opened if that lock has three digit number lock if the last digit is 9 and sum of the first two digits is less than or equal to the last digit. numbers are from 0-9
A person left house with speed 40 mile per hour his wife after 30 minutes left to catch him at a speed of 50. In what time she will catch?
If a refrigerator contains 12 cans such that 7 blue cans and 5 red cans. In how many ways can we remove 8 cans so that atleast 1 blue can and 1 red can remains in the refrigerator?
a person who decided to go weekend trip should not exceed 8 hours driving in a day average speed of forward journey is 40 mph.due to traffic in sun days the return journey average speed is 30 mph.how far he can select a picnic spot.
In a lock of 4 rings there r five characters how many unsuccessful attempts can be made ?