The following code is used in a bookstore program to determine how many discount coupons a customer gets. Complete the table that appears after the program.
int numBooks, numCoupons;cout ≪ "How many books are being purchased? ";cin ≫ numBooks;if (numBooks<1) numCoupons = 0;else if (numBooks<3) numCoupons = 1;else if (numBooks<5) numCoupons = 2;else numCoupons = 3;cout ≪ "The number of coupons to give is "≪ numCoupons ≪ endl;
If the customer purchases this many books | This many coupons are given. |
1 |
|
3 |
|
4 |
|
5 |
|
10 |
|
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.