Skip to content

Commit

Permalink
add ts program for convert centimeters to feet (#2709)
Browse files Browse the repository at this point in the history
  • Loading branch information
victoriacheng15 committed Oct 12, 2022
1 parent c8bc9e8 commit 6fbc094
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function ConvertCentimetersToFeet(cm: number) {
return (cm / 30.48).toFixed(2);
}

const cm = 152.4;
console.log(`Input: ${cm} cm`);
console.log(`${cm} cm is ${ConvertCentimetersToFeet(cm)} feet`);

0 comments on commit 6fbc094

Please sign in to comment.