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

  Design an eight-input priority encoder

Design an eight-input priority encoder with inputs A7:0 and outputs Y2:0 and NONE should be 0. Give a simplified Boolean equation for each output.

  Data storagenbspcomputer processes need to be able to store

data storagenbspcomputer processes need to be able to store data during the execution phase. the data may need to be

  Deducing an expression for pp

Utilizing the information above, deduce an expression for the PP, and provide comment on resulting expression. Also, what the ATM services would you utilize in order to obtain the best possible performance?

  Difference between the two main programming styles

Three-sided box that is connected to the step it references by a dashed line - You represent a decision in a flowchart by drawing a decision symbol.

  How java programing benefits to nonprogrammers

How does knowledge of programming concepts benefit individuals working in any IT position.

  The overall goal of this new system will be to organize

check point new system proposalnbspupon reviewing riordan manufacturing inc.s current and historical sales and

  Create a storyboard diagram depicting the layout of website

Create a narrative that describes the site to your prospective client. Imagine that your narrative has been approved. Use Word, Visio, or Dia to: Create a storyboard diagram depicting the layout of your Website.

  Describe ergonomic risk factors associated with a sharp edge

Describe the ergonomic risk factors associated with a sharp edge on a work bench. Include supporting evidence as part of your discussion.

  How would you challenge mpi to verify its claims

How would you challenge MPI to verify its claims regarding reducing turnover, increasing productivity, and decreasing stress and anger?

  Which website can an ethical hacker visit to see web pages

CMIT 321- Which website can an ethical hacker visit to see web pages from 2002? Which of the following statements best describes a penetration test?

  Developing the audio technologies

A company noting down the success of 24-bit digital audio technologies as compared to earlier 16-bit digital audio technologies has decided to work on developing the 28-bit digital audio technology.

  Prepare a written review of an article from a recent

prepare a written review of an article from a recent business magazine. also prepare a powerpoint presentation as

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