Write a program that asks the user to enter the number of


Assignment

1. The date June !0, 1960, is special because when it is written in the following format, the month times the day equals the year: 6/10/60. Design a program that asks the user to enter a month (in numeric form), a day, and a two-digit year. The program should then determine whether the month times the day equals the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic.

2. 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 2 books, he or she earns 5 points.
- If a customer purchases 4 books, he or she earns 15 points.
- If a customer purchases 6 books, he or she earns 30 points.
- If a customer purchases 8 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, then displays the number of points awarded.

3. A software company sells a package that retails for $99. Quantity discounts are given according to the following table:

Quantity        Discount
10-19              10%
20-49              20%
50-99              30%
100- or more   40%

Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount.

4. Write a program that asks the user to enter a number of seconds and works as follows:

- There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should convert the number of seconds to minutes and seconds.

- There are 3600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3600, the program should convert the number of seconds to hours, minutes, and seconds.

- There are 86400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86400, the program should convert the number of seconds to days, hours, minutes, and seconds.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that asks the user to enter the number of
Reference No:- TGS02660024

Expected delivery within 24 Hours