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
Flauer [41]
2 years ago
5

Write an alogorithm and draw the Flow Chart to

Computers and Technology
1 answer:
svp [43]2 years ago
7 0

In computer programs, algorithms and flowcharts are used as prototypes of an actual program

<h3>The algorithm</h3>

The algorithm of the program is as follows:

  • Input a, b, c
  • Calculate d using d = b*b - 4 * a * c
  • If d < 0, print "Complex roots"
  • Else
  • Calculate x₁ using x₁ = (-b + sqrt(d))/4 * a * c)
  • Calculate x₂ using x₂ = (-b - sqrt(d))/4 * a * c)
  • Print x₁ and x₂
  • End

<h3>The flowchart</h3>

This is always in represented using a diagram

See attachment for the flowchart.

Read more about flowchart and algorithms at:

brainly.com/question/16763367

#SPJ1

You might be interested in
Excel
raketka [301]
I think the correct answer from the choices listed above is option B. <span>Auto Fill options menu options is the same as the Fill Series option by the fact that it is also a fill without formatting. Hope this answers the question. Have a nice day. Feel free to ask more questions.</span>
8 0
3 years ago
Heat transfers from an area of ____temperature to an area of ___ temperature.
dsp73

Answer:

Higher, lower. I really hope this helped!!!

5 0
3 years ago
(JAVA programming) Guess Number program
amm1812

Answer:

The following are the program in the Java Programming Language.

import java.util.Random; //import package

import java.util.Scanner; //import package

//define a class

public class GuessNumber {

   //define a main method

   public static void main(String[] args)

   {

       //create object of the Scanner class

       Scanner cs = new Scanner(System.in);

       //print message

       System.out.println("Guess the secret number\n");

       //print message

       System.out.print("Enter the maximum value for the secret number: ");

       //get input in the integer variable through scanner class object

       int maxNum=cs.nextInt();

       //create object of the Random class

       Random ran = new Random();

       //declare an integer variable that store random number  

       int guessed = 1+ran.nextInt(maxNum);

       //set the while loop

       while (true)  

       {

           //print message

           System.out.println("\nA new secret number has been chosen.");

           //set two integer variables to 0

           int user = 0;

           int count = 0;

           //set the while loop

           while (user != guessed)  

           {

               //print message

               System.out.print("Enter guess: ");

               //get input in the variable from user

               user = cs.nextInt();

               //increment the variable by 1

               count++;

               //check that the user is less than guessed

               if (user < guessed)  

               {

                   //then, print message

                   System.out.println("low, try again.");

               }

               //check that user is greater than guessed

               else if (user > guessed)  

               {

                   //then, print message

                   System.out.println("high, try again");

               }

           }

           //print message with count

           System.out.println("You won in " + count + "!");

           //print message and get input

           System.out.print("\nPlay again? (Y/N)");

           cs.nextLine();

           String again = cs.nextLine();

           //check that input is y

           if(again.equalsIgnoreCase("y"))

           {

               //then, loop again iterates

               continue;

           }

           //otherwise, loop is break

           else{

               break;

           }

       }

   }

}

Explanation:

<u>The following are the description of the program</u> :

  • Firstly, we import the required packages and define the class 'GuessNumber'.
  • Inside the class, we create the object of the scanner class and the random class then, get input from the user through scanner class object and generate random number through the random class object.
  • Then, set the while infinite loop in which we declare two integer data type variables and assign them to 0 then, set while loop inside the infinite loop that iterates when the 1st variable is not equal to the second one then, get input from the user through scanner class object.
  • Then, check that input number is less than the random number then, print message otherwise, again check that input number is greater than the random number then, print message or if both numbers are equal then print the message with the count.
  • Finally, the program asks for play again, if the input is 'y' then, infinite loop again iterates otherwise the infinite loop is break.
4 0
3 years ago
Suppose we have the list: list = [1,2,3,4,5,6]
mixer [17]
1, 2, 3, 10, 5, 6 is the answer
6 0
2 years ago
You are working at Walmart when a shipment of tee shirts is delivered, the manager asked you to arrange the shirts on the rack b
madreJ [45]

this would be arranging by size. Small < Large usually

6 0
3 years ago
Other questions:
  • The class shown below called is called CSVReader. Use this class exactly as it is written (specifically don’t add any instance v
    8·1 answer
  • What is the name of the intel technology that allows a processor to handle two threads at the same time?
    6·1 answer
  • How do you give the brainliest answer to someone?
    8·2 answers
  • You need to transmit PII via email and you want to maintain its confidentiality. Which of the following choices is the BEST solu
    8·1 answer
  • Which of the following are associated with Public Key encryption? (Select all that apply.) Question 2 options: a) Asymmetric key
    5·1 answer
  • Which part of an I-statement involves a description of your needs or feelings? The part of an I-statement involves a description
    5·2 answers
  • What types of storage can be used to access your data on another computer
    5·1 answer
  • Can Any One Marry Baby YODA?
    9·2 answers
  • Please select the word from the list that best fits the definition
    11·2 answers
  • How did the invention of the printing press affect society?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!