Question: #include using namespace std; float calculateCharges(int hours) { if(hours = 10.00) return 10.00; else return ans; } } int main() { int a,b,c; cout <

#include using namespace std; float calculateCharges(int hours) { if(hours <= 3) return 2.00; else { float ans; ans = (hours - 3)*0.50; if(ans >= 10.00) return 10.00; else return ans; } } int main() { int a,b,c; cout<<"Enter the Number of hours three cars stayed"<>a>>b>>c; float p,q,r; p = calculateCharges(a); q = calculateCharges(b); r = calculateCharges(c); cout<<"========================"<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!