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
Agata [3.3K]
3 years ago
9

Write the program to solve quadratic equations, but if the discriminant is negative, output

Computers and Technology
1 answer:
Firdavs [7]3 years ago
8 0

Answer:

PROGRAM  QuadraticEquation Solver

  IMPLICIT  NONE

REAL :: a, b, c ;

  REA :: d ;

  REAL  :: root1, root2 ;

//read in the coefficients a, b and c

  READ(*,*)    a, b, c  

  WRITE(*,*)   'a = ', a

  WRITE(*,*)   'b = ', b

  WRITE(*,*)    'c = ', c

  WRITE(*,*)

// computing the square root of discriminant d

  d = b*b - 4.0*a*c

  IF (d >= 0.0) THEN              //checking if it is solvable?

     d     = SQRT(d)

     root1 = (-b + d)/(2.0*a)     // first root

     root2 = (-b - d)/(2.0*a)     // second root

     WRITE(*,*)  'Roots are ', root1, ' and ', root2

  ELSE                            //complex roots

     WRITE(*,*)  'There is no real roots!'

     WRITE(*,*)  'Discriminant = ', d

  END IF

END PROGRAM  QuadraticEquationSolver

You might be interested in
after clicking the start button on your computer screen desktop what option would you then select to examine system components y
Len [333]
Start>hover over "Computer">right-click>Properties>shows system specs

Start>Control Panel>lets you modify network connections, change time and date, update, uninstall programs, add new hardware, etc.
7 0
2 years ago
Sedimentary rock formation occurs when igneous, metamorphic, or other sedimentary rocks are exposed to the unyielding forces of
Natalija [7]
Deposition is the answer
3 0
3 years ago
Read 2 more answers
The read/write heads of a hard disk gently rest on the hard disk platters in order to read and write the data.
noname [10]
The answer is FALSE because the interior of commercial Hard disk drive is with stack of magnetic disks (platters) containing the user’s data and a rotating arm supporting the magnetic heads. The rotating arm is moved by the torque generated by a voice coil motor (VCM) mounted at one end of the arm. Data read/write operations rely on the capability of the governing unit of the HDD to maintain the magnetic read/write heads as close as possible to center of the desired track. Typically, reliability of data reading and writing is guaranteed when the head is kept within 5% of the track pitch from the track center. This means that the accuracy required for the head positioning is in the range of a few tens of nanometers.
6 0
3 years ago
What is the shortcut key to apply /remove the subscript effect?<br> Ctrl+=<br><br> Ctrl-+
telo118 [61]

Answer:

Press "Ctrl, "Shift" and "=" on your keyboard to turn off superscript formatting.

5 0
2 years ago
How does the technology work
Ivan

Answer:  it does – or perhaps appears to do – in the world.

Explanation:

sorry if am not right have a nice day lol

6 0
2 years ago
Read 2 more answers
Other questions:
  • When configuring a vpn server to automatically assign ​ip addresses to remote clients, how many ip addresses are in a single poo
    10·1 answer
  • What is the use of ROM chip in computer system?​
    13·1 answer
  • Which type of computer operating system would be best for a large corporation?
    7·2 answers
  • What does the clone tile command do?
    15·2 answers
  • A jackhammer uses pressurized gas to transmit force to the hammer bit. What type of mechanical system is it?
    13·1 answer
  • Which tool ia used to create the world wide web?
    15·1 answer
  • From where do we get information or knowledge? Explain.
    12·2 answers
  • You can resize a row in a table by dragging the ____.
    13·1 answer
  • 12. In Justify the text is aligned both to the right and to the left margins, adding extra space between words as necessary *
    13·2 answers
  • In cell b12 create a formula using max f7nction to calculate maximum value in B4:B9
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!