RE: [Dev-C++] Fw: C++ Program Help Please
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2000-10-12 11:28:32
|
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Linda
Hohenstein
Sent: Wednesday, October 11, 2000 7:54 PM
To: DevCpp List
Subject: [Dev-C++] Fw: C++ Program Help Please
I'm having a trouble understanding how to do this assignment.
We are supposed to send a character constant as areference parameter to
the function GetUserInput six times - to get Odometer
A character constant: 'a'. As an argument to a function f() which accepts
a reference of a char. f('a').
Start, Odometer End, Hours Start, Hours End, Minutes Start and Minutes
End. The instructor said that I do not have to initialize (as in (//get
total mileage) StartReading, but to just send the string. I don't
understand the syntax for doing this or how to use it in the output
statement.
I am also confused about how to do the Average Speed function. Since we
are required to convert the total time of the trip into minutes, someone
could travel a hundred miles in two hours, but then it would be 100/120
which doesn't make sense. The function
I did not understand it. I think your time is 120 minutes here.
for turning minutes into hours and minutes also gets an error for using
ints. However, we don't want a float for this since we have to output the
times in hour:minute format.
Suppose you have traveled 169 minutes. 169/60 is the hours of the journet
and 169%60 is the rest of the minutes.
So in this example:
169/60=2 hours
169%60= 49 minutes.
Total time: 2 hours + 49 minutes.
Ioannis
|