#include #include #include using namespace std; int main(){ int p, x, y, dv, di, r, i, w; vector x1; vector x1r; vector y1; vector y1r; cout<<"Introduce la base: "<>p; cout<<"Introduce the first number: "<>x; cout<<"Introduce the second number: "<>y; dv=x; di=p; while (dv>=p){ r=dv-((dv/p)*p); dv=dv/p; x1.push_back(r); //cout<=p){ r=dv-((dv/p)*p); dv=dv/p; y1.push_back(r); } y1.push_back(dv); while(x1.size()>y1.size()){ y1.push_back(0); } while(y1.size()>x1.size()){ x1.push_back(0); } i=x1.size()-1; while(i>=0){ x1r.push_back(x1[i]); //cout<=0){ y1r.push_back(y1[i]); //cout< > mult(x1r.size()); for (int i=0; i > multr(x1r.size()); for (int i=0; i sumatot; int emp1=0, tt=0; emp=0; w=0; for(int j=0; j sumatotr; int rr=sumatot.size()-1; cout<<"result: "; while(rr>=0){ sumatotr.push_back(sumatot[rr]); cout<