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
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
THERE ARE 3 MIXTURES WHEN MIXED IN THE RATIO OF 3:4:5 PRICE WAS 240.WHEN MIXED WITH 6:4:9 PRICE WAS 340.WHAT'S THE PRICE WHEN MIXED IN 5:6:8 RATION PRICE IS
f(X)= 2X-1 + f(X-1) if X is not equal to zeroandiff(X=0)=0, If f(X)-f(X-1)=f(X-8) for X>5 then X= ?
When time is 1:50, what is the angle between the two hands of a clock?
if 8x+4y=6 and 4x+5y=7, x+y equlals
If D is adjacent to F then who is adjacent to C?
What annual payment will discharge a debt of rs. 6,450 Due in 4 years at 5% per annum simple interest?
f(X)=4f(X-1) THEN VALUE OF X=
a man is 24 years older than his son. In two years, his age will be twice the age of his son. The present age of his son is?
A person meets a train at a railway station coming daily at a particular time . One day he is late by 25 minutes, and he meets the train 5 k.m. before the station. If his speed is 12 kmph, what is the speed of the train.
How many 3-digit numbers will be there which are divisible by 19?
A certain quantity of milk is found to be adulterated to the extent of 10%. What proportion of the adulterated milk should be replaced with pure milk to take the purity level to 98%?
The ratio of the number of boys and girls in a school is 3:2 Out of these 10% the boys and 25% of girls are scholarship holders. % of students who are not scholarship holders.?
What is the selling price of a scooter? If the cost of the scooter is Rs 50 and a profit of 10% over selling price is earned.
A monkey starts climbing up a tree 20ft. tall. Each hour, it hops 3ft. and slips back 2ft. How much time would it take the monkey to reach the top?