Program eq2 implicit none real :: ar,br,cr complex :: a,b,c,d,x1,x2,test1,test2 write(6,*) ' Equazione 2° grado: dammi a,b,c' read(5,*) ar,br,cr a=cmplx(ar,0) b=cmplx(br,0) c=cmplx(cr,0) d=b**2-4*a*c x1=(-b-sqrt(d))/(2*a) x2=(-b+sqrt(d))/(2*a) write(6,*) "x1=", x1 write(6,*) "x2=", x2 test1=a*x1*x1+b*x1+c test2=a*x2*x2+b*x2+c write(6,*) test1,test2 end