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
xeze [42]
2 years ago
13

arrange the following lines to make a program that determines when the number of people in a restaurant equals or exceeds 10 occ

upants. the program continually gets the number of people entering or leaving the restaurant. ex: 2 means two people entered, and -3 means three people left. after each input, the program outputs the number of people in the restaurant. once the number of people in the restaurant equals or exceeds 10, the program exits.
Computers and Technology
1 answer:
kkurt [141]2 years ago
5 0

Using the knowledge of computational language in python it is possible to write a code that program that determines when the number of people.

<h3>Writting the code:</h3>

<em> public static void main(String[] args) {</em>

<em>        Scanner scnr = new Scanner(System.in);</em>

<em>        int maxNumPeople = 10;</em>

<em>        int totalNumPeople = 0;</em>

<em>        while (totalNumPeople < maxNumPeople) {</em>

<em>            if (totalNumPeople < 0) {</em>

<em>                totalNumPeople = 0;// we are using line number 10 to check is the total number is less than zero if yes then assign totla number to 0</em>

<em>            }</em>

<em>            try//we are using line number 8 </em>

<em>            {</em>

<em>                totalNumPeople += scnr.nextInt();//line number 11 to get the number from user and add it to total number</em>

<em>                System.out.println("Occupancy: " + totalNumPeople);//using line 3 to display the number of occupants</em>

<em>            } catch (InputMismatchException e)//using line number 1</em>

<em>            {</em>

<em>                scnr.next();//use line 4 to discard the single string</em>

<em>                totalNumPeople += scnr.nextInt();//get the next int</em>

<em>                 System.out.println("Occupancy: " + totalNumPeople);</em>

<em>            }</em>

<em>        }</em>

<em>        System.out.println("We're full!");</em>

<em />

<em>    }</em>

See more about python at brainly.com/question/18502436

#SPJ1

You might be interested in
PLS HELP
kvasek [131]

Answer:

informative, discrimiitive,critical thats the order

4 0
3 years ago
In the Sender Message Channel Receiver (SMCR) model, the ______ is the large, bureaucratic organization that produces messages.
mafiozo [28]

Answer:

Sender.

Explanation:

The Sender Message Channel Receiver (SMCR) model of communication was developed and created by David Berlo in 1960. SCMR was developed from the Shannon-Weaver model of communication of 1949.

The SCMR model of communication comprises of four (4) main components and these are;

1. Sender (S): this is typically the source of information (message) or the originator of a message that is being sent to a receiver. Thus, they are simply the producer of a message.

2. Channel (C): this is the medium used by the sender for the dissemination or transmission of the message to the recipient. For example, telephone, television, radio, newspapers, billboards etc.

3. Message (M): this is the information or data that is being sent to a recipient by a sender. It could be in the form of a video, audio, text message etc.

4. Receiver (R): this is typically the destination of information (message) or the recipient of a message that is being sent from a sender.

Hence, in the Sender Message Channel Receiver (SMCR) model, the sender is the large, bureaucratic organization that produces messages.

Additionally, encoding is the process of transmitting the message from the sender to the recipient while decoding is the process of interpreting the message that is being received from a sender.

7 0
3 years ago
Which statement is unnecessary inside the unit test for the custom controller?
Anna [14]

Answer:

A. public ExtendedController(ApexPages.StandardController cntri) { }

Explanation:

A wizard is generally referred to as the tab sequence that contains the back button as well as the next button. It usually accepts information (i.e. data) from the inputs of users from different pages of the visualfoce as well as a variable from the previous website. The statement in option A is unnecessary for the application of the custom controller.    

5 0
4 years ago
What is the name of tool in number 9 picture? CAPITAL LETTER ONLY
Mariana [72]

Answer:

WHERE IS THE PICTURE??????????

3 0
3 years ago
Edhesive lesson practice 8.3, question 5
scZoUnD [109]

Answer:

3

Explanation:

8 0
3 years ago
Other questions:
  • I am doing Microsoft Excel and I have do formulas, Can some please explain to me how do them?
    14·1 answer
  • Pressing the Ctrl+Home keys moves the insertion point to the
    12·2 answers
  • Henry is nervous speaking in public, and it shows every time he presents his ideas to his coworkers and manager. One of his team
    6·2 answers
  • Write code to simulate the following differential equation for x ranging from 0 to 5. Assume y = 0 when x = 0. Plot y vs. x usin
    11·1 answer
  • When all RGB colors have the same value, the resulting color will most likely be some variation of _______________.
    11·1 answer
  • My speaker on my phone is not working, when I try and play music and videos the sound dosen't work. However my alarm works. Can
    9·2 answers
  • Four categories of installer apps
    13·1 answer
  • The transmission control protocol (TCP) layer helps computers to communicate in which of the following ways?
    10·1 answer
  • Which of these is an example of output?
    13·2 answers
  • Question 2 of 10
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!