/* Computer Science & Programming Jason M. Snouffer Wednesday, October 16, 2002 Lab 7 Problem 6 Test Suite: Input Output 3.1 $2.50 6 $3.50 23.7 $8.00 28 $10.50 48 $16.00 All of the sample inputs within this test suite were tested and performed as expected. */ #include #include #include using namespace std; int main() { int cost_in_cents(0), cost_dollar_amount, added_cost_in_cents, day(1); double how_long, length_roundedup; cout<<"How long would you like to park (in hours): "; cin>>how_long; length_roundedup = ceil(how_long); while (length_roundedup > 0) { if (length_roundedup < 3) { cost_in_cents += 200; length_roundedup = 0; } else if (length_roundedup > 3 && length_roundedup <= 24) { added_cost_in_cents = (length_roundedup - 3) * 50 + 200; cost_in_cents += added_cost_in_cents; if (cost_in_cents > (day*800) ) { cost_in_cents = day * 800; } length_roundedup = 0; } else if (length_roundedup > 24) { length_roundedup -= 24; cost_in_cents += 800; } day++; } cost_dollar_amount = cost_in_cents/100; cost_in_cents = cost_in_cents%100; cout<<"The cost for parking will be $" <