Rename chapter 2 to chapter2/ex2

This commit is contained in:
LSvekis
2021-06-22 15:35:16 -04:00
committed by GitHub
parent 691f5babdb
commit b4921e41f4
+14
View File
@@ -0,0 +1,14 @@
let myDistanceKM = 130;
let myDistanceMiles = myDistanceKM * 1.60934;
console.log('The distance of ' + myDistanceKM + ' kms is equal to ' + myDistanceMiles + ' miles')
//1 inch = 2.54 centimeters.
//2.2046 pounds in a kilo
let inches = 72;
let pounds = 180;
let weight = pounds / 2.2046; // in kilos
let height = inches * 2.54; // height in centemeters
console.log(inches,pounds);
console.log(weight, height);
let bmi = weight/(height/100*height/100);
console.log(bmi);