ten /= to;
}
reverse(ans.begin(), ans.end());
return ans;
}
int main() {
//测试2,8,10,16...进制相互转换
cout << trans("351306", 8, 2) << "\n";
cout << trans("946351", 10, 2) << "\n";
cout...<< trans("a6b816", 16, 2) << "\n";
cout << "\n";
cout << trans("101111111001", 2, 8) << "\n...n";
cout << trans("a6b8c9def", 16, 8) << "\n";
cout << "\n";
cout << trans("10000001", 2,...cout << trans("fe60a6b8c", 16, 10) << "\n";
cout << "\n";
cout << trans("1101010101", 2,