Write a procedure
void factor(int n, int& f, int& q);
to store in @f@ the most frequent factor of @n@, and store in @q@ how many times it appears. If there is a tie, choose the smallest factor. For instance, if called with @n@ , the values after the call must be @f@ and @q@ .
@n@
You only need to submit the required procedure; your main program will be ignored.
Input/Output