//6.12
#include <iostream>
#include <iomanip>
using namespace std;
double CalculateCharges (double car1=1.5,double car2=2.0,double car3=24.0);
int main ()
{
cout<<" Parking Garage Rates " << endl;
cout<<setw(10);
cout<<"Car"<<"Hours"<<"Charge"<<endl;
double car1;
for (int i=1;i<=3;i++)
cout<<i<<CalculateCharges(car1)<<endl;
cout<<"Total"<<endl;
return 0;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
double CalculateCharges(double car1, double car2, double car3)
{
double rate;
double hours[3];
hours[0]=car1;
hours[1]=car2;
hours[2]=car3;
int b;
for( b = 0; b <= 3; b++ ){
hours[b] = b;
}
for (double h=0;h<=24;h=+hours[b])
{
if (h<=3)
rate = 2.00;
else if (h>=3)
{
rate = (.50*h);
}
else if ( h == 24 )
{
rate = 10.00 ;
}
}
}
So the thing complies, but it does not generate any numbers, or anything like that.. I'm confused.. help.