# Have you tried centimeters = int(meters * 100) n/m

Posted by Perivs Anathema (91 SE) on September 17, 2004 at 09:48:29: In Reply to: Quick question... posted by atulb84 on September 17, 2004 at 09:42:20: : I just started to take some CIS classes. Anyway, this is my first "real" program in VB. I have to make a program that allows the user to enter the number of miles, yards, feet, and inches and it converts it into kilometers, meters, and centimeters. The program requires that we use the 'INT' function to break the number of kilometers and meters. The centimeters have to be rounded to one decimal place. I have done everything, but I cant figure out how to get the number of centimeters. This is what I have done for the other two formulas... : totalinches = ((63360 * miles) + (36 * yards) + (12 * feet) + (inches)) : totalmeters = totalinches / 39.37 : kilometers = Int(totalmeters / 1000) : meters = Int(totalmeters Mod 1000) : centimeters = ? : : Any help would be appreciated. Thanks in advance Replys: yeah i tried that, didnt work.... atulb84 (93 se) 09:57:09 9/17/2004 (0)

Name: |
E-Mail |
Car: |
Subject |
Message:
: : I just started to take some CIS classes. Anyway, this is my first "real" program in VB. I have to make a program that allows the user to enter the number of miles, yards, feet, and inches and it converts it into kilometers, meters, and centimeters. The program requires that we use the 'INT' function to break the number of kilometers and meters. The centimeters have to be rounded to one decimal place. I have done everything, but I cant figure out how to get the number of centimeters. This is what I have done for the other two formulas... : : totalinches = ((63360 * miles) + (36 * yards) + (12 * feet) + (inches)) : : totalmeters = totalinches / 39.37 : : kilometers = Int(totalmeters / 1000) : : meters = Int(totalmeters Mod 1000) : : centimeters = ? : : : : Any help would be appreciated. Thanks in advance