Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
QE
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
Program QE Implicit none Real a, b, c, x1, x2, D a=1.0 b=4.0 c=4.0 D=b**2-4*a*c If(D .lt. 0) then Write (*, *) "roots are imaginary" Else x1=(-b+sqrt(D))/2*a x2=(-b-sqrt(D)) /2*a Write (*, *) "the roots are x1 and x2", x1, x2 Endif End Program QE
Show compiler warnings
[
+
]
Show input
Compilation time: 0.12 sec, absolute running time: 0.16 sec, cpu time: 0.01 sec, memory peak: 5 Mb, absolute service time: 0,39 sec
edit mode
|
history
|
discussion
the roots are x1 and x2 -2.00000000 -2.00000000