Description: [Problem Description] Write a function itob (n, s, b), is used to convert the integer n base b string and stored in s. Written procedures, use the function itob (n, s, b) the input integer n, converted to a string s, the s output. strings converted from the highest non-zero bit to start output. If n is negative, the first character of the output is - . b is greater than a value of less than 37 of any nature. When b = 2, the output character can only be 0 and 1 When b = 16, the output string may contain characters 0 - 9 , a - f (letter in lower output). b may also be other values . For example, enter n = 33, b = 17, the output 17 hex value "1g" 33 s.
[Form] input console input integer n and b, where n can be negative. n and b separated by a space.
[Output format] console output after conversion string s.
Sample input [52]
Sample output] 101
[Description] binary sample 5 is 101
[Standard] results entirely correct score 20 points, 4 points for each test poin
To Search:
File list (Check if you may need any files):
getprimenum
...........\Debug
...........\.....\getprimenum.exe
...........\.....\getprimenum.ilk
...........\.....\getprimenum.obj
...........\.....\getprimenum.pch
...........\.....\getprimenum.pdb
...........\.....\itob.exe
...........\.....\itob.ilk
...........\.....\itob.obj
...........\.....\itob.pch
...........\.....\itob.pdb
...........\.....\vc60.idb
...........\.....\vc60.pdb
...........\getprimenum.dsp
...........\getprimenum.dsw
...........\getprimenum.ncb
...........\getprimenum.opt
...........\getprimenum.plg
...........\itob.c
...........\itob.dsp
...........\itob.dsw
...........\itob.ncb
...........\itob.opt
...........\itob.plg