Results 1 to 4 of 4

Thread: Homework Help Needed

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    22

    Homework Help Needed

    Hey guys this is my first post Long time forum reader

    This is my homework question:

    Write a to convert a U.S. Customary System length in miles, yards, feet, and inches to a Metric System length in kilometers, meters, and centimeters. After the number of miles, yards, feet, and inches are read from the text boxes, the length should be converted entirely to inches and then divided by 39.97 to obtain the value in meters. The Int function should be used to break the total number of meters into a whole number of kilometers and meters. The number of centimeters should be displayed to one decimal place. Some of the needed forumlas are as follows.

    total inches = 63360 * miles + 36 *yards +12 * feet + inches
    total meters = total inches/39.37
    Kilometers - Int(meters/1000)

    In the diagram for the sample run:

    Miles: 5
    Yards: 20
    Feet: 2
    Inches: 4

    When you click on the button " Covert To Metric" the follow is the output:

    The metric length is
    8 kilometers
    65 meters
    73.5 centimeters

    Using the numbers in the sample run:

    Total Inches = 317548
    Total Meters - 317548/39.37 = 8065.735331
    Kilometers = 8.065735331

    So, I was able to get the Kilometers right baesd on the formula given. Howeverfor meters I seem to be off by quite a large number. I realize that I have calculated the "total meters" but is there something else I have to do to convert "total meters" into the Metric system?

    Cheers,
    Last edited by sadio; May 3rd, 2010 at 10:52 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width