The following function is supposed to take as arguments a length
expressed in feet and inches and return the total number of inches in that
many feet and inches. For example, total_inches(1,2) is supposed to
return 14, because 1 foot and 2 inches is the same as 14 inches. Will the
following function perform correctly? If not, why not?
double total_inches(int feet, int inches)
{
inches = 12 * feet + inches;
return inches;
}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here