Recursive function to convert to base

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

int Convert(int num, int base)
{
	// What is the formula?
}

int main()
{
	//variables
	int num;
	int base;

	std::cout << "Enter a number: ";
	std::cin >> num;
	std::cout << "Enter a base: ";
	std::cin >> base;

	std::cout << num << " in base " << base << " is :" << Convert(num, base) << std::endl;
	system("pause");
}


I don't need the code, just the formula :)
Topic archived. No new replies allowed.