Building up Information using a loop and cin.
I cannot seem to get the total hours and profit up, as when I enter 99 it makes the total_profit and total_hours become 99.
Any help would be appreciated, I've been stuck on this for about 25 minutes.
Here's the basic concept of the code:
while (hours_parked < 99)
"Customer" << '\t' << "Hours" << '\t' << "Charge\n";
cout << counter <<
'\t' << '\t' << hours_parked << '\t' << calculateCharge(hours_parked) << '\n' << '\n';
cin >> hours_parked;
total_profit = hours_parked * calculateCharge(hours_parked);
total_hours = hours_parked;
"Total Hours: " << total_hours << '\n';
"Total Profit: " << total_profit << '\n';