13. Below, the type of costPerOunce and the function return type are float so that cost can be expressed in terms of dollars and cents (e.g., 1.23 means $1.23).
These types could be integer if cost is expressed in terms of cents only (e.g., 123 means $1.23).
float Postage( /* in */ int pounds,
/* in */ int ounces,
/* in */ float costPerOunce )
3. Change the body of GetData so that it begins as follows:
{
Boolean badData; // True if an input value is invalid
badData = TRUE;
while (badData)
{
cout << Enter the number of crew (1 or 2). << endl;
cin >> crew;
badData = (crew <CH:160>1 || crew > 2);
if (badData)
cout << Invalid number of crew members. << endl;
}
badData = TRUE;
while (badData)
{
cout << Enter the number of passengers (0 through 8).
<< endl;
cin >> passengers;
badData = (passengers <CH:160>0 || passengers > 8);
if (badData)
cout << Invalid number of passengers. << endl;
}