6. The following function calculates the sum of the numbers from 1 through n. However, it has an unintended side effect. What is it?
void SumInts( int& n,
int& sum )
{
sum = 0;
while (n >= 1)
{
sum = sum + n;
n = n - 1;
}
}
7. Given the function heading
Boolean HighTaxBracket( int inc,
int ded )
is the following statement a legal call to the function if income and deductions are of type int?
if (HighTaxBracket(income, deductions))
cout << Upper Class;
8. The statement
Power(k, l m);
is a call to the void function whose definition is on the next page. Rewrite the function as a value-returning function, then write a function call that assigns the function value to the variable m.