// Castulo Jason Quintero CSC5 Chapter 4, pg. 222, #11
//
/*******************************************************************************
*
* Collect and Compute Book Reward Points
* _____________________________________________________________________________
* This program collects the user inputs for the number of books
* purchased each month and rewards points accordingly.
* _____________________________________________________________________________
* INPUT
* books : number of books purchased
*
* OUTPUT
* ZERO_BOOKS : 0 books = 0 points
* ONE_BOOK : 1 book = 5 points
* TWO_BOOKS : 2 books = 15 points
* THREE_BOOKS : 3 books = 30 points
* FOUR_BOOKS : 4 or more books = 60 points
*
******************************************************************************/
#include <iostream>
using namespace std;
int main() {
// CONSTANTS - Points assigned to number of books
const int ZERO_BOOKS = 0;
const int ONE_BOOK = 5;
const int TWO_BOOKS = 15;
const int THREE_BOOKS = 30;
const int FOUR_BOOKS = 60;
int books;
// prompt user
cout << "Book Club Points";
cout << "\nEnter the number of books you have purchased "
"this month: ";
cin >> books;
// determine points
if (books == 0)
cout << "\nYou earned " << ZERO_BOOKS << " points.";
else if (books == 1)
cout << "\nYou earned " << ONE_BOOK << " points.";
else if (books == 2)
cout << "\nYou earned " << TWO_BOOKS << " points.";
else if (books == 3)
cout << "\nYou earned " << THREE_BOOKS << " points.";
else if (books >= 4)
cout << "\nYou earned " << FOUR_BOOKS << " points.";
else
cout << "\nYou entered an invalid number.";
return 0;
}