Name: ____________________________________________________ Alpha: _____________________
Describe help received: _________________________________________________________________
lenUnitCF(fromUnit, toUnit)
I've already defined, which will be useful!~/$ ./p1 convert to kilometers 45 miles + 3987 feet ; 73.6357 kilometers ~/$ ./p1 convert to inches 2354 millimeters + 0.00022 nautical-miles ; 108.718 inches ~/$ ./p1 convert to nautical-miles 2 miles + 2 kilometers ; 2.81786 nautical-miles ~/$ ./p1 convert to light-years 1234 miles + 5678 kilometers ; 8.10095e-10 light-years
~/$ ./p2 Enter x: 2.5 the 7th harmonic number is 2.59286, which is the first greater than 2.5 ~/$ ./p2 Enter x: 3.25 the 14th harmonic number is 3.25156, which is the first greater than 3.25 ~/$ ./p2 Enter x: 3.5 the 19th harmonic number is 3.54774, which is the first greater than 3.5 ~/$ ./p2 Enter x: 9.75 the 9631th harmonic number is 9.75001, which is the first greater than 9.75
~/$ ./p3 Enter first time: 3:12:42 Enter second time: 4:06:19 Ellapsed time is 3217 secondsThis program uses no functions. Pull out repeated code into one or more functions in order to simplify the program. The new program needs to give the same results as before!
codeprint p1.cpp p2.cpp p3.cpp... which should also save you some paper.