// this is a version of the solution if Round is written // as a free, non-member function void Round(BigInt & A, int N) // postcondition: A has been rounded to the Nth power of 10 { apstring s = A.ToString(); if (s[N-1] >= '5') // if digit char > '5' then round { AddPowerOfTen(A, N); } A.ZeroRight(N); }