Code:
if (numOfPages <= 10)
cout << "Billing Amount for less than 10 pages: " << endl;
cin >> billingAmount >>
cout << "Bill Amount: " << endl;
else (numOfPages > 10)
cout << "bill amount for more than 10 pages: " << billingAmount << "Bill Amount: " << endl;
billingAmount = 3.00 + (numOfPages * 0.20);
billingAmount = 3.00 + 10 * 0.20+(numOfPages - 10) * 0.10;
You don't need to get the billingAmount from the user. You're just supposed to calculate it based on the number of the pages. Also, you don't need a condition for the else:
Code:
if (numOfPages <= 10)
billingAmount = 3.00 + (numOfPages * 0.20);
else
billingAmount = 3.00 + 10 * 0.20+(numOfPages - 10) * 0.10;
You had all the code there, you just had a whole lot of extra.