CSCI 116
Project #2: Unit
Conversions
Purpose: To practice doing simple input and
output and arithmetic using variables.
Program objective: Your program is to take a speed in units of miles
per hour and convert it to the equivalent speed in units of furlongs per
fortnight.
Instructions:
Write a program that asks the user to a speed in miles per hour. Your program should then read the speed and
echo it back out. It should then convert
the speed to furlongs per fortnight, and print the results of the
conversion. After printing out the
results, your program should exit normally.
Here is some sample output:
Enter a speed
(miles/hour): 60
60mph is 161280
furlongs/fortnight
Press any key to
continue
Of course, to
be able to do this conversion, we need to know how many furlongs per fortnight
1 mile per hour actually is.
A fortnight is two weeks or 14 days, while a furlong is 220 yards, or
660 feet. So if I have x miles per hour,
then that becomes
so to convert from miles per hour to
furlongs per fortnight, I just multiply miles per hour by , or , or 2688.
That should
about cover it…have fun!