n n Write a program that will keep asking the user to input integers until he inputs
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that will keep asking the user to input integers until he inputs -1, or the sum of all inputs has reached or exceeded 2000. When the sum has exceeded 499, print "You're off to a good start!". When the sum exceeds 999, print "You're halfway through!". Finally, when the sum exceeds 1499, print "You're almost there!". If the program ended because of an input of -1, print "Program was terminated. Your total sales are: " and then the actual value of the total sales. Otherwise, print "Congratulations! Your total sales are: Inputs 1. Series of integer inputs Several integer inputs that will either reach a sum of 2000, or ends with a -1. 500 200 100 -1 Write a program that will keep asking the user to input integers until he inputs -1, or the sum of all inputs has reached or exceeded 2000. When the sum has exceeded 499, print "You're off to a good start!". When the sum exceeds 999, print "You're halfway through!". Finally, when the sum exceeds 1499, print "You're almost there!". If the program ended because of an input of -1, print "Program was terminated. Your total sales are: " and then the actual value of the total sales. Otherwise, print "Congratulations! Your total sales are: Inputs 1. Series of integer inputs Several integer inputs that will either reach a sum of 2000, or ends with a -1. 500 200 100 -1
Expert Answer:
Answer rating: 100% (QA)
Write a program that will keep asking the user to input integers until he inputs 1 or the sum of all inputs has reached or exceeded 2000 When the sum ... View the full answer
Related Book For
Supply Chain Logistics Management
ISBN: 978-0078024054
4th edition
Authors: Donald Bowersox, David Closs, M. Bixby Cooper
Posted Date:
Students also viewed these programming questions
-
You hold a portfolio of securities which have had the following annual returns: {5%, 10%, -11%, 0%, 22%, 9%}. What is the geometric mean of the returns? Select one: a. 5.348% b. 3.98% c. -1.239% d....
-
If the population is 1,462, the sample size is 100, sample mean 473, and the sample standard deviation is 12.4, approximate the 95% confidence interval for the mean Select one: a. 47.06 to 78.08 b....
-
A statistics student asked seven first-year economics students to report their grades in the required mathematics and economics courses. The results (where 1 = F, 2 = D, 3 = C, 4 = B, 5 = A) are as...
-
Paula makes the following acquisitions of ordinary shares in Indigent plc: She sells 500 shares on 28 March 2021. No shares are acquired within the next 30 days. (a) Show the s104 holding on 28 March...
-
Use the annual report of Carnival Corporation for the 2007 scal year to answer the following questions. This information can be found on either the annual report or the SEC 10-K ling at...
-
The chart of accounts lists capital accounts first, followed by liabilities, assets, expenses, and revenue. True/False
-
When an investment bank underwrites an issue of new shares, it charges the issuing company a commission. How is this commission analysed using options theory?
-
Carnival Corporation has recently placed into service some of the largest cruise ships in the world. One of these ships, the Carnival Dream, can hold up to 3,600 passengers and cost $750 million to...
-
3. Find the mZKSO In the diagram below of parallelogram ROCK, m/C is 70 and m/ROS is 65. 65 C 70% R S K
-
Good Homes Construction Company is about to begin the construction of a large new home. The companys president, Michael Dean, is currently planning the schedule for this project. Michael has...
-
See the 2.25% contingent convertible notes due 2037 (row 18 in footnote 3). Assume that these bonds' par amount is $600. What is these bonds' effective interest rate?. CHESAPEAKE ENERGY CORPORATION...
-
A vendor offers a 1 5 % discount on orders greater than and including 5 0 0 0 . If your store needs to order 4 0 0 0 units at $ 4 . 0 0 each, should you increase the order to get the discount? Why or...
-
Bonds Ginormous Hats is interested in replacing its hat molder with a new improved model. The molder has a salvage value of $5,000 now and a zero salvage value of in five years, if rebuilt. If the...
-
Firefly Lawn Mowing and Plowing Inc. services both residential and commercial clients. Management believes that the commercial sector has more growth opportunities and is considering dropping the...
-
Sand preparation testing (green sand) metal casting Q1. Discuss the impact/effect of them experiment tonthe safety, health and environmental
-
From a strategic management perspective, examine the U.S. domestic automobile industry. Which of the influences in the broad (remote) environment do you see as having the greatest impact in the next...
-
Item No. a Debit or Credit Memo EE 8-3 p.413 PE 8-3A Bank reconciliation reases or Decreases the Balance of the Company's Bank Account OBJ. S The following data were gathered to use in reconciling...
-
Feller Company purchased a site for a limestone quarry for $100,000 on January 2, 2019. It estimate that the quarry will yield 400,000 tons of limestone. It estimates that its retirement obligation...
-
Distinguish among different types of supply chain collaborative relationships. What drives the differences?
-
Why is least total cost performance not always what a customer prefers? Illustrate a situation that supports your answer?
-
What alternative approaches would you recommend to Levi Strauss to more precisely match customer requirements?
-
Why and how do tax authorities get involved in the transfer pricing situation?
-
Assume a VAT situation where the tax rate is 15 percent, with export sales exempt. The manufacturer does not purchase inputs on which VAT has been paid, and its net selling price to the wholesaler...
-
A Galex Com pain, a manufacturer of stereo systems, started its production in October 2002. For the preceding 3 years Galex had been a retailer of stereo systems. Alter a thorough survey ol stereo...
Study smarter with the SolutionInn App