Commit 540babc8 authored by Karine's avatar Karine

Exercise_06_12, Version6

parent 2a374b3b
......@@ -20,11 +20,11 @@ calculateCharges(const double hours)
int
main()
{
double carHours;
double totalHours = 0.0;
double totalAmount = 0.0;
for (int i = 1; i <= 3; ++i) {
double carHours;
std::cout << "Enter the parking hours of a car: ";
std::cin >> carHours;
std::cout << std::endl;
......@@ -34,7 +34,7 @@ main()
return 1;
}
double amount = calculateCharges(carHours);
const double amount = calculateCharges(carHours);
totalHours += carHours;
totalAmount += amount;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment