The following program is used in a bookstore to determine how many discount coupons a customer gets. Complete the table that appears after the program.
#include <iostream>
using namespace std;
int main()
{
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;
return 0;
}
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.