Write a full program that continually asks the user for a number until they type in -1. The program should compute the maximum of the numbers they have provided. Assume the user always provides positive numbers. You MUST use a while loop to receive credit. Submit your full code and a screenshot corresponding to each of the inputs below.. Sample Interaction 1: Sample Interaction 2: Enter a number: 3 Enter a number: 1 he max is 3 Enter a number: 2 Enter a number: 4 Enter a number: 1 The max is 4 Sample Interaction 3: Enter a number: 9 Enter a number: 31 Enter a number: 52 Enter a number: 17 Enter a number: 1 The max is 52
Write a full program that continually asks the user for a number until they type in -1. The program should compute the maximum of the numbers they have provided. Assume the user always provides positive numbers. You MUST use a while loop to receive credit. Submit your full code and a screenshot corresponding to each of the inputs below.. Sample Interaction 1: Sample Interaction 2: Enter a number: 3 Enter a number: 1 he max is 3 Enter a number: 2 Enter a number: 4 Enter a number: 1 The max is 4 Sample Interaction 3: Enter a number: 9 Enter a number: 31 Enter a number: 52 Enter a number: 17 Enter a number: 1 The max is 52
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 13E
Related questions
Question
Answer the given question with a proper explanation and step-by-step solution.
C++
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 4 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning