Question #217400

In a Fortran program, if I have set x=2.0,a=2.0, b=4.0, what is the value of y. If y=a*x+b**2/x?


Expert's answer

program yCalculator
   x=2.0
   a=2.0
   b=4.0
   y=a*x+b**2/x
   Print *,"y = ", y
end program yCalculator


Run
$gfortran -std=gnu *.f95 -o main
$main
   y= 12.0000000   

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS