Ja na szybko zrobiłem coś takiego
#include <iostream>
using namespace std;
int main()
{
int p, d, w, r;
cout<<"Podaj dzielna"<<endl;
cin>>p;
cout<<"Podaj dzielnik"<<endl;
cin>>d;
w=p/d;
r=p-w*d;
cout<<"Wynik dzielenia = "<<w<<" reszta = "<<r;
return 0;
}