Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the 8th term in the series 1, 4, 9, 18, 35, 68, . . .

1281


25 stations ,24 stations are inbetween- - - - - how many tickets should be required.

1047


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?

1126


find 70.56/ 11.2 =?

1416


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.

1142


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)

1153


Using the digits 1,5,2,8 four digit numbers are formed and the sum of all possible such numbers.

1211


how would you connect 8 dots with 3 lines.

1809


If DBMDVUUB = CALCUTTA Then BOMBAY = ?

2129


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 ?

1167


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

3106


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

1383


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?

1161


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

1133


1/3 of girls , 1/2 of boys go to canteen. What factor and total number of classmates go to canteen.

1688