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...
-
The average length of a hospital stay in general or community hospitals in the United States is 5.5 days. Assuming a population standard deviation of 2.5 days and a simple random sample of 50...
-
Match each item with a type of liability. Reasoning Liabilities are classified as provisions if there is significant uncertainty about the amount of the future outflows of economic benefits....
-
Liberty's return on common stockholders' equity can be described as a. Weak b. Normal c. Average d. Strong
-
The Atlantic Refinery Corporation ( ARC) is a public company headquartered in St. Johns, Newfoundland. On 31 December 20X5, the post- closing trial balance included the following accounts ( in...
-
39. If cosA = , and A lies in quadrant IV, and cosB = = 5 and
-
Which series has the highest beta. BraveNewCoin Liquid Index for Bitcoin 1D BNC Trading Brave Ne Yellow Green Blue Orange
-
It is now Nov 2018. A company anticipates that it will buy 1.0 million barrels of light sweet crude oil in August 2019. CME Light Sweet Crude futures contracts (1 contract is for 1,000 barrels or...
-
What is gross working capital? And what is net working capital?
-
What would immediately identify the balance sheet and the incomeexpense statement?
-
Describe the payback technique and give a simple example to illustrate how this technique works.
-
Can the firm satisfy its needs by only depending on its long-term borrowing while not using any short-term debt? And what would we call such a strategy?
-
Define and compare home business to family business.
-
Jerry owns a dry-cleaning business. During the current year, Jerry purchased and placed into service $730,000 of equipment. He had taxable income of $745,000. Jerry is in the highest marginal income...
-
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?
-
How is the fixed asset list automatically updated?
-
Restore the file Santa Barbara Sailing Ch 12 (Backup) that you downloaded from the student companion site, and then do the following like you did in the chapter: Create a new client in the Fixed...
-
What circumstances require the fixed asset list to be manually updated?
Study smarter with the SolutionInn App