Problem

2/5

Number in P number system (P<10)

Problem

Write a recursive procedure that converts a number to any number system with base 2 to 9.   
Input:
The input to the program is the number N (N<=1024) - a number in the 10 numeral system and the number P (2<=P<=9) (numbers N and P are entered separated by a space)
Output:
Display one number on the screen - a number in P-ary number system

Example:
Input:
75 6
Output:
203