In your code, you missed:
Quote:
1. First, determine the total number of centimeters.
And this matters because meters and centimeters and not exact multiples of inches and foot.
Advice: Take a sheet of paper and a pencil, practice the conversion with examples until you master the algorithm. Read carefully the requirement, the 5 steps is your algorithm.
Once you master the details, write your code.
We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.