#include <iostream>
using namespace std;
string fromDec(int number, int newBase) {
string converted = "";
int remainder = 0;
while (number > 0) {
remainder = number % newBase;
number = number / newBase;
if (remainder > 9) {
converted = (char)('A' + remainder - 10) + converted;
} else {
converted = (char)(remainder + '0') + converted;
}
}
return converted;
}
int main() {
int number = 241;
int base = 16;
string converted = fromDec(number, base);
cout << number << "(10) = " << converted << "(" << base << ")" << endl;
return 0;
}