while constructs and for constructs are both looping constructs -- you can use either one of them for looping purpose if thats what you wanted to ask.
decimal += (tmp_number % 10) * pow( source_base, i ) ;
Here decimal is the var which will hold the decimal value of the entered number with the base "source_base". To it we iteratively add the digit * source_base ^ i.
Here digit is obtained by doing tmp_number % 10 while i controls the exponent value.
Last edited by ~s.o.s~; Oct 30th, 2006 at 3:43 pm.
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 720
Failure as a human
Offline 8,873 posts
since Jun 2006