<prompt> Nina integer ya desimali. Jinsi ya kubadilisha ni kwa msingi wa hiari k katika C ?  <response>: You can use the following algorithm to convert a decimal integer n to an arbitrary base k:1. Initialize an empty string result to store the converted number.2. While n is greater than 0, do the following: a. Append the remainder of n divided by k to the beginning of result. b. Set n to n k.3. Return result.In C, the implementation would look like this:cstd::string decimalToArbitraryBaseint n, int k std::string result ; while n 0 result std::to_stringn k result; n k; return result;This function takes two arguments: the decimal integer n and the base k. It returns a std::string representation of the converted number. 