Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !
- ! Quadratic equation solver
- !
- PROGRAM QuadraticEquation
- IMPLICIT NONE
- REAL :: A, B, C
- REAL :: D
- WRITE(*,*) 'Enter A, B, C : '
- READ(*,*) A, B, C
- D = SQRT(B*B - 4 * A * C)
- WRITE(*,*) 'Positive solution : ', (-B + D)/(2.0*A)
- WRITE(*,*) 'Negative solution : ', (-B - D)/(2.0*A)
- END PROGRAM QuadraticEquation
Add Comment
Please, Sign In to add comment