Q:

why does the process return -1?

Running the following code:
int main()
{
    double hour[3];
    double charge[3];

    double sum_hour = 0;
    double sum_charge = 0;

    for (int i = 1; i <= 3; i++)
    {
        cout<<"Enter the hours for car No. "<<i<<": ";
        cin>>hour [i];

        if (hour [i] <= 3.0)
            {charge [i] = 2.00;}
        if (hour [i] > 3.0 && hour [i] < 24)
            {charge [i] = 2.00 + (ceil(charge [i] -3))*0.5;}
        if (hour [i] == 24.0)
            {charge [i] = 10.00;}

        sum_hour  = sum_hour + hour [i];
        sum_charge = sum_charge + charge [i];
    }

    cout<<"Car"<<setw(10)<<"Hours"<<setw(10)<<"Charge"<<endl;

}

I receive the following message after the for loop has been executed and the code does not run the cout after the loop:
Process returned -1 (0xFFFFFFFF) execution time...

A:

In the loop for (int i = 1; i <= 3; i++) array indexing should start from 0. Change your loop to:
for (int i = 0; i < 3; i++)

Your array index goes out of bounds when i is 3 here cin>>hour [i];, its undefined behavior.
To add here, do not do floating point comparisons:
if (hour [i] <= 3.0)// 

Although this is not related to your original question, read Why doesn't my floating-point comparison work? 

