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
Which data type is also called a binary object?
Andrej [43]
Binary large objects(BLOb):this data type is also called a binary object, and its fields are called binary fields.
7 0
3 years ago
Read 2 more answers
A common hardware component found in electronic devices including desktop computers, laptops, tablets and smartphones. The amoun
Maurinko [17]

Answer:

A. RAM

Explanation:

RAM (Random Access Memory) is the hardware in a computing device where the operating system (OS), application programs and data in current use are kept so they can be quickly reached by the device's processor.

8 0
3 years ago
Edhesive assignment 1 movie ratings
Oliga [24]

Answer:

ok

Explanation:

3 0
2 years ago
Which protocols are TCP/IP application layer protocols? (choose all that apply)
natita [175]

Answer:

Option(b) and Option(c) is the correct answer for the given question.

Explanation:

TCP stands for transmission control protocol, In the TCP protocol firstly it maintains the connection between the sender and the receiver. The receiver always gives an acknowledgment to the sender when it receives the information that's why TCP is reliable protocol it is found in TCP/IP application layer protocols    

UDP stands for user datagram protocol, In the UDP protocol, it does not maintain the connection between the sender and the receiver. The receiver does not give any acknowledgment to the sender that why UDP is not a reliable protocol . it is also found in the TCP/IP application layer protocols

  • In the option(a) IP is found in the network layer that why this option is incorrect.
  • In the option(d) FTP is found in the application layer thats why this option is incorrect .

Hence TCP and UDP are TCP/IP application layer protocols

5 0
2 years ago
Read 2 more answers
Word can store a maximum of how many documents in its Recent Documents area? five ten fifteen twenty
djyliett [7]
The answer is twenty.
5 0
2 years ago
Other questions:
  • Which of the following STEM discoverers is known for creating complex computational physics to develop computer models to simula
    7·1 answer
  • Based on the passage​ and/or drawing on your prior​ knowledge, you realize that an HMO is​ what?
    9·1 answer
  • Micheal has increased the contrast of the given picture. Which feature or menu option of a word processing program did he use? A
    15·1 answer
  • Explain how the operating system controls the software and hardware on the computer?
    5·1 answer
  • which scheduling algorithm allocate the CPU firt to the process that request the CPU first, (a) first come first serve,(b) short
    9·1 answer
  • ________ are the symbolic codes used in assembly language?​
    6·1 answer
  • Several small stores rent space within a larger shopping centre. The owners of the shopping centre have provided a physical netw
    15·1 answer
  • Given a number n, for each integer i in the range from 1 to n inclusive, print one value per line as follows:
    12·1 answer
  • 30 POINTS FOR THE ANSWER
    6·1 answer
  • You have recently compiled a custom Linux kernel. You notice some performance issues with and need to use the kernel log files t
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!