operator * method

Rat operator *(
  1. Rat other
)

Multiplies this Rat by other.

Implementation

Rat operator *(Rat other) {
  return Rat(n * other.n, d * other.d);
}