JavaScript program to convert centimeters into millimeters

Views: 152   

Following program shows you how to convert centimeters to millimeters.
In this program we get centimeters from user once we get those we need to multiply with 10 so that we get in millimeters

var centimeters = parseInt(prompt("Please enter centimeters:"));
var millimeters = centimeters * 10;
console.log(millimeters + " Millimeters");


Please enter centimeters:
100 Millimeters
On By