1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Katyanochek1 [597]
3 years ago
10

Write a C++ program which prompts the user to enter some numbers and finds the largest number of those entered. Entering 0 shoul

d terminate the sequence of numbers and cause the largest number found to be displayed.
Computers and Technology
1 answer:
ANEK [815]3 years ago
5 0

Answer:

Following are the program in c++

#include<iostream> // header file  

using namespace std; // using namespace

int main() // main method

{

  int number, maximum; // variable declaration

  cout << "Entering the number 0 will terminate the program:\n";

  do{

      cin >> number;// read the number

      if(number == 0) // check the condition if number is 0  

      break;

      if(maximum < number) // finding the maximum number

      maximum = number; // assign the number to maximuim variable

  }while(true);

  cout << "The largest of the numbers is : " << maximum << endl;

}

Output:

Entering the number 0 will terminate the program:

19

56

560

6

0

The largest of the numbers is : 560

Explanation:

In this Program we read the number from the user in the do while loop .The loop will iterating untill user is not entered 0 also it checks the condition of finding maximum number in that loop by using if(maximum < number) statement in this condition it store the maximum number in maximum variable .

if user is entered 0 the loop will terminated and Print the maximum number.

You might be interested in
Most hand sewing begins and ends with
Burka [1]
I would say it has to be b but its what the correct answer is its up to you!

I hoped this helped you out!

Have a nice day!

4 0
4 years ago
You are a network administrator. Your company recently approved of employees working from home one day a week and the use of emp
Orlov [11]

Answer:

To establish the BYOD policy is the correct answer to the following question.

Explanation:

<u>Implementation of the BYOD(Bring Your Own Device)</u>:

  1. Firstly, set you objectives and establish it.
  2. Then, you have to decide and tell your employees that what types of devices are only allowed in your organization.
  3. Then, establish your security policies related to the BYOD policy.
  4. Then, give good training by you or by the IT professionals to your employees.
  5. Finally, if the employee are leaving your organization then, you have to remove those employees from the BYOD policy by which they cannot access your company's informations.
8 0
3 years ago
Which of the given original work is protected by the copyright law
andreyandreev [35.5K]
BMW is my desion u cant copy write alot of things like books movies logos
7 0
4 years ago
Read 2 more answers
why might a portrait be both a portrait of the subject and the photographer? how is a photographer present in a portrait?
Nataliya [291]
Because of the reflection on the window or mirror.
5 0
3 years ago
Read 2 more answers
A computer game that can be purchased online and played right away has good _____ utility.
ratelena [41]
D. Time

It’s easy to access any time even after it was just purchased.

I hope this helped
6 0
3 years ago
Other questions:
  • All objects in an object-oriented program are instantiated (created) from a ____.
    12·1 answer
  • Write a class called Counter that represents a simple tally counter, which might be used to count people as they enter a room. T
    9·1 answer
  • The color band that represents tolerance on a resistor is the?
    11·1 answer
  • Which one of these students is having a positive impact?
    8·2 answers
  • Suppose as a computer programmer, you have been assigned a task to develop a program to store the sorted data in ascending order
    9·1 answer
  • What is the name for a hardcoded value entered into a formula ?
    8·2 answers
  • which of the following statements about matter is true a.matter is anything that occupies space and possesses mass b.matter can
    5·2 answers
  • What do Business Analysis workers do? Check all that apply.
    15·2 answers
  • Guess The Song:
    9·1 answer
  • What is your impression on the subject fundamentals of database systems?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!