看板 Fortran 關於我們 聯絡資訊
real 的變數宣告,default is 4- bytes real, 有效位數,精確度 只有 6 - 7位 所以,。。。 !dec$if (.false.) 1.6976348E+07 1.6976348E+07 Press any key to continue !dec$endif ! ----------------------------------------------- program CF0610 implicit none real x, y x= 4.0*atan(1.0) y= x + 1.0 ! y > x do while (y .GT. x) x= x*1.0001 y= x + 1.0 end do ! y <= x write(*, *)x, y end program CF0610 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.231.16.169