Get the number
1)Divide it by the base u want to convert it to
2)Store the remainder
3)Store the quotient in the variable you initially got
4) Repeat the steps 1 and 2 till the conditon in Step 5 is reached
5) Check if the quotient is less than the base in this case 5, if so store the quotient in the variable where you store the remainder as the last value.
6)Reverse the variable where you have stored the remainder
7) Display the reversed variable, this will be the answer.
That is the logic, you can write the program now
"I have one report of a frustrated geek who took his PC into the middle of a parking lot and dosed it with two gallons of gasoline. That's a bit much. Two cups would have been more than sufficient."--Kent Norman