PDA

View Full Version : help with conversions


n00b++
09-22-2003, 06:21 PM
Im new to these forums, I need some help with a program that im trying to write:sad:. Ok Im supposed to convert metric system to the british system. The program is supposed to look something like this( user inputs are in bold):

Which metric units do you want to convert? (Enter g for gram, k for kilogram or m for metric ton) : m
Enter the number of metric tons: 20.3

20.3 metric tons is equivalent to the following british mesurements.

TONS POUNDS OZ
=============================
22 753 13.43

Do you have another number to convert?(Enter 'y' or 'n'):


ok so thats what its supposed to look like. I just need help with the function(s) I should write. I have no idea how he got 735 pounds and 13.43 oz.... If someone could point me in the right direction i would be forever greatfull. thanks

CrazyMeat
09-23-2003, 01:35 AM
Err I knwo this might sound kinda stupid of me but could you provide the forumula you use to change from all those to the metric system. I'm too lazy to look in my book and I don't even think its in there.

jamessan
09-23-2003, 08:47 AM
http://www.onlineconversion.com/

That site should give you a hand in figuring out the conversions. I'm pretty sure the example they gave you is with bogus numbers. They were just giving you a format to use.

n00b++
09-23-2003, 01:09 PM
ok yea that was what was driving me nuts, I mean i found the conversions and was doing the math and nothing I did resulted in the numbers he got.... Ive been doing it for the past 3 days pulling my hair out. ok well thanks guys i think i got it from here.8)