Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Not getting exact output

$
0
0

 

Hi,

I am Gaurav & just started using fortran. I tried to run following code for which output should be 10.5 but instead I am getting 16.5. Why is it so? please tell

PROGRAM try

    REAL (KIND=8):: x,y,z
    x=0.5;y=0.25434678E9;z=0.25434677E9
    w=x+y-z
    PRINT*,w
    END PROGRAM try

Regards,

Gaurav K.


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>