It worked fine for me too. What sort of error is it?
Today is also my first day of coding (in any language). I wanted to re-create what you did with what I have learned. Being a newbie, I don't really know how sloppy my code is.
#include <iostream>
int main ()
{
int a = 0;
int b = 0;
int c = 0;
int r = 0;
std::cout << "a = ";
std::cin >> a;
std::cout << "b = ";
std::cin >> b;
std::cout << std::endl;
c = a / b;
std::cout << "Quotient = " << c << '\n';
r = a % b;
std::cout << "Remainder = " << r;
return 0;
}