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...
-
Because attitudes are learned predispositions to respond, why dont marketers and consumer researchers just measure purchase behavior and forget attitudes?
-
Barnes accepted Clarks offer to sell to him a portion of Clarks coin collection. Clark forgot that his prized $20 gold piece at the time of the offer and acceptance was included in the portion which...
-
Refer to Googles financial statements in Appendix A to compute its equity ratio as of December 31, 2015, and December 31, 2014. Data From Google Financial Statement Appendix A Google Inc....
-
Anna Schaub, the financial manager at the Mangiamo restaurant, is checking to see if there is any relationship between newspaper advertising and sales revenues at the restaurant. She obtains the...
-
The index of refraction for a particular material is 1.38. Determine the speed of light in this medium. Light passes from water (n=1.33) into air (n=1.003) at an angle of incidence of 25 degrees....
-
1. Assume you are Vince Brofft and want to lead the change to save the plant. Describe how you would enact the first three stages outlined in Exhibit 15.2 of the text. 2. Describe three tactics you...
-
Vanillin is the major substance in vanilla, which is used in making many sweet baked foods. Vanillin is a weak acid with pka of 7.4. When making chocolate chp cookies (see picture recipe), vanilla is...
-
Identify one Strength in K & N's approach to the workforce. Base your response on the guidelines in the Team Project Instructions for writing a Strength comment: Begin by identifying the diagnostic...
-
In a single Word document, minimum 7 full pages (not including cover page and citations), using appropriate APA, answer the following questions using the week's reading materials and video to guide...
-
How does a strong mission and vision statement for a company influence the organizations strategic decision making? Select a company from the hospitality industry that you think has a strong mission...
-
Briefly describe what you would do to back up your home computer to protect yourself from a computer failure. What are the most common cause of computer failures? How would your procedures protect...
-
Regarding The new Simply Orange Juice lawsuit 2023: Who will this action have an effect on? What social problems would the action affect? What aspect of the environment would the action affect? Will...
-
Create a data model in 3NF (third normal form) for attributes Ticket_Type Passenger_Name Station_Description Station_Type Station_Location Station_Coordinates Passenger_Type . Create an associative...
-
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?
-
If you make multiple measurements of your height, you are likely to find that the results vary by nearly half an inch in either direction due to measurement error and actual variations in he ight....
-
Loveland, Colorado, is 18 km due south of Fort Collins and 3 1 km due west of Greeley. What is the distance between Fort Collins and Greeley?
-
Migrating geese tend to travel at approximately constant speed, flying in segments that are straight lines. A goose flies 32 km south, then turns to fly 20 km west. Afterward, how far is the goose...
Study smarter with the SolutionInn App