Question: These are two different problems I need writing cpp files for. Thanks. I need help writing a c++ program for these two problems thanks. 13.

These are two different problems I need writing cpp files for. Thanks.  These are two different problems I need writing cpp files for.

I need help writing a c++ program for these two problems thanks. 13. Book Club Points Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows If a customer purchases 0 books, he or she earns 0 points If a customer purchases 1 book, he or she earns 5 points. If a customer purchases 2 books, he or she earns 15 points. If a customer purchases 3 books, he or she earns 30 points. If a customer purchases 4 or more books, he or she earns 60 points Write a program that asks the user to enter the number of books that he or she has purchased this month and then displays the number of points awarded. 18. Fat Gram Calculator Write a program that asks for the number of calories and fat grams in a food. The pro- gram should display the percentage of calories that come from fat. If the calories from fat are less than 30% of the total calories of the food, it should also display a message indicating that the food is low in fat. One gram of fat has 9 calories, so Calories from fat = fat grams * 9 The percentage of calories from fat can be calculated as Calories from fat total calories Input Validation: Make sure the number of calories and fat grams are not less than 0. Also, the number of calories from fat cannot be greater than the total number of calories. If that happens, display an error message indicating that either the calories or fat grams were incorrectly entered

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!