Add four new functions to your convert.js library file that convert between pounds and kilograms, and also between square feet and square meters. Note that:
1 kilogram = 2.205 pounds
1 square meter = 10.764 square feet
Once you have done this, modify your metric.html page so that the user can convert values using each of these functions.
```
function PoundsToKilograms(pounds)
// Assumes: pounds is a weight, measured in pounds
// Returns: the corresponding weight in kilograms
{
var kg;
kg = pounds/2.205;
return kg;
}
function KilogramsToPounds(kg)
// Assumes: kg is a weight, measured in kilograms
// Returns: the corresponding weight in pounds
{
var pounds;
pounds = kg * 2.205;
return pounds;
}
function SqFeetToSqMeters(sqFeet)
// Assumes: sqFeet is an area, measured in square feet
// Returns: the corresponding area in square meters
{
var sqMeters;
sqMeters = sqFeet/10.764;
return sqMeters;
}
function SqMetersToSqFeet(sqMeters)
// Assumes: sqMeters is an area, measured in square meters
// Returns: the corresponding area in square feet
{
var sqFeet;
sqFeet = sqMeters * 10.764;
return sqFeet;
}
--------------
Length in inches:
Length in centimeters:
onclick="ConvertToInches();">
Weight in pounds:
Weight in kilograms:
Area in square feet:
Area in square meters:
```
You might also like to view...
To permanently delete an e-mail message in Outlook, you can hold down the ________ keys
Fill in the blank(s) with correct word
____ are created with paths and fills.
A. Pixels B. Bitmaps C. Vector graphics D. Digital images
Which of the following should be primarily be avoided?
A) Creating a focal point on slides B) Underlining text C) Title text 36 pt or higher D) Bullet text of 28 pt or higher
The ________ gallery displays a set of predefined characteristics that change the overall visual look of a chart
Fill in the blank(s) with correct word