To solve the quotient and remainder, follow the following formula: remainder = dividend % divisor; quotient = dividend/divisor