Centimeters to Feet
X cm = Y ft
Create a centimeters to feet converter
- Step 1: create a variable
centimeters
with value 60 - Step 2: create a variable
factor
with value 0.0328084 (1 cm = 0.0328084 feet) - Step 3: calculate the corresponding length in feet and assign it to a variable
feet
- Step 4: replace the content of the
span
tags with the value of thecentimeters
andfeet
variables - Step 5: round the result to 2 digits after the comma