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
maw [93]
2 years ago
10

Write an algorithm and draw a flowchart for switching off a machine after it has made 500 glass bottles. use an appropriate cond

itional statement for this
please hurry i need urgent
please answer correct
or i will report
Computers and Technology
1 answer:
masha68 [24]2 years ago
4 0

The algorithm is as follows:

1. Start

2. bottles = 0

3. While bottles != 500

3.1 Create bottle

3.2 bottle = bottle + 1

4. Switch off machine

5. Stop

Explanation:

This begins the algorithm

1. Start

This initializes bottles to 0

2. bottles = 0

The loop is repeated until 500 bottles is created

3. While bottles != 500

This creates a new bottle

3.1 Create bottle

This increments the number of bottles by 1

3.2 bottle = bottle + 1

This switches of the machine after all bottles are created

4. Switch off machine

End algorithm

5. Stop

THANKS

You might be interested in
(1) Prompt the user to enter a string of their choosing. Output the string.
barxatty [35]

Answer:

See solution below

See comments for explanations

Explanation:

import java.util.*;

class Main {

 public static void main(String[] args) {

   //PrompT the User to enter a String

   System.out.println("Enter a sentence or phrase: ");

   //Receiving the string entered with the Scanner Object

   Scanner input = new Scanner (System.in);

   String string_input = input.nextLine();

   //Print out string entered by user

   System.out.println("You entered: "+string_input);

   //Call the first method (GetNumOfCharacters)

   System.out.println("Number of characters: "+ GetNumOfCharacters(string_input));

   //Call the second method (OutputWithoutWhitespace)

   System.out.println("String with no whitespace: "+OutputWithoutWhitespace(string_input));

   }

 //Create the method GetNumOfCharacters

   public static int GetNumOfCharacters (String word) {

   //Variable to hold number of characters

   int noOfCharactersCount = 0;

   //Use a for loop to iterate the entire string

   for(int i = 0; i< word.length(); i++){

     //Increase th number of characters each time

     noOfCharactersCount++;

   }

   return noOfCharactersCount;

 }

 //Creating the OutputWithoutWhitespace() method

 //This method will remove all tabs and spaces from the original string

 public static String OutputWithoutWhitespace(String word){

   //Use the replaceAll all method of strings to replace all whitespaces

   String stringWithoutWhiteSpace = word.replaceAll(" ","");

   return stringWithoutWhiteSpace;

 }

}

6 0
3 years ago
Power brakes:
IgorLugansk [536]
The answer is B becausePower brakes are a system of hydraulics used to slow down or stop most motor vehicles. It uses a combination of mechanical components to multiply the force applied to the brake pedal by the driver into enough force to actuate thebrakes and stop a vehicle that can weigh several tons.
5 0
3 years ago
Read 2 more answers
What are the benefits of writing functions that use parameters and return List 2 please and explain what is return
Ratling [72]

<u>Answer and explanation:</u>

There are many benefits of writing functions that use parameters and return. Some of them are:

1. Flexibility: With functions having parameters, several values of the parameters can be used at invocation time thereby making the application flexible. For example, given the following function in Java.

<em>public void showName(String name){</em>

<em>    System.out.println("Your name is " + name);</em>

<em>}</em>

To call this method (function), the programmer could use various values for the name parameter used in the function like so:

showName("John");

showName("Doe");

If the function didn't have a parameter, it is possible it will only print a hardcoded name every time the function is called.

2. Scope Control: When a function is allowed to return a value, it helps to work around scope issues since variables declared within a function are limited to that function and do not exist outside the function. This means that the values of these variables cannot be used anywhere else outside the function in which they are being declared. However, if the function returns a value, the value can be used anywhere else in the program.

For example:

<em>public String getDouble(int x){</em>

<em>    int y = x * 2</em>

<em>    return y;</em>

<em>}</em>

The function above returns twice the value of the argument supplied to it. Since the integer variable y is declared within the function, it's value cannot be used outside the function. However, since the value is being returned by the function, it could be used anywhere the function is being called. Thanks to the return keyword.

3 0
3 years ago
Do you play Rocket League
lakkis [162]
Yessirrr like 3 times a week
6 0
2 years ago
Read 2 more answers
You are a very small company that sells healthcare insurance plans. You estimate that the breach of your customer database will
lozanna [386]

Answer:

C. Accept the risk

Explanation:

The first option is close but might not be suitable for a small company considering it's cost.

The second option which is to spend fifty thousand dollars per year on a data loss prevention solution is projected to cost you more than the risk.

The third option isn't specific and lacks a course of action.

6 0
3 years ago
Other questions:
  • "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequen
    12·1 answer
  • Abram was asked to explain to one of his coworkers the XOR cipher. He showed his coworker an example of adding two bits, 1 and 1
    7·1 answer
  • Our readings so far explored computer hardware and software, in particular operating systems and application software. There are
    11·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • What is an advantage of cross-brace bridge​
    10·1 answer
  • To combine concepts or ideas into a whole is called
    11·2 answers
  • Stephanie would like to know the average number of regular hours worked by her employees. In cell B11, create a formula using th
    8·1 answer
  • In order to preview an attachment in an e-mail, click the attachment in the ______
    8·1 answer
  • How to design remote access policy using the appropriate access controls for systems,applications, and data access
    6·1 answer
  • 1. A bank customer invested $24 in a bank with 5 percent simple interest per year, write a program the construct a table showing
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!