This problem requires some basic integer arithmetic:
Let us consider $N$
(the numerator) to be 9 and $D$
(the denominator) to be 5.
The integer division of $N$
over $D$
is:
$Q = N / D = 9 / 5 = 1$
Then calculate the remainder:
$R = N - B \times Q = 9 - 5 * 1 = 4$
You can now print the mixed fraction as $\texttt{Q R D}$
:
$\texttt{1 4 5}$