Write a program that enter the number of packages purchased

Assignment Help Computer Engineering
Reference no: EM131864526

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.

Reference no: EM131864526

Questions Cloud

What would be the prospective stock price after the issue : What was the total amount of new money raised? What would be the prospective stock price after the issue?
Determine the power delivered by the motor : If oil leaves the motor at 200 psi, determine the power delivered by the motor.
What affect does parenting style have on the child behavior : Describe how marital relationships, a child's age, and a child's temperament all contribute to the manner in which a parent "parents" a child.
What is the amount of the cash flow to creditors : Logitech has net income of $320,000. What is the cash flow to stockholders? What is the amount of the cash flow to creditors.
Write a program that enter the number of packages purchased : Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount.
Find the overall efficiency of the motor : If the actual flow rate consumed by the motor is 75 gpm and the actual torque delivered by the motor is 1300 in.-Ib, find the overall efficiency of the motor.
Describe the four phases of a project : Describe the four phases of a project in your own words and outline activities in each phase. Pick a project that would have a score of 1 on the DCPI.
What is the significance of stephens dying vision of jesus : Cornelius is described in Acts 10 as devout, fearing God, and prayerful. Indeed, God took note of his good works and heard his prayers.
Find the equation of the best-fitting straight line : In studying the "ozone-deficit" problem (Science, September 23, 1994, page 1835), one experiment measured laser-induced fluorescence

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd