Trace the function above. After, write the function to make it work correctly. Write a programn to test that function. If declared at the start of the function, the scope is from where it is declared to the end of that function.
Local variable are generally better.
Each operation combines numbers of certain types, and returns a certain type. The result type depends on the types of the operands, not their values. The result is the same type as the operands if both are the same.