#include
#include
using namespace std;
int main()
{
int n,p;
string S;
cout <<"n = ",cin >> n;
cout <<"p = ",cin >> p;
while(n / p > 0){
S = (char)(n % p+'0')+S;
n /= p;
}
if(n!=0){S = (char)(n+'0')+S;}
cout <<"n_p = "<<S<<"\n";<br> system("Pause");
return 0;
}