!  x=0.0, 0.1, ..., 1.0 縺ｮ縺昴ｌ縺槭ｌ縺ｮ2荵励ｒ雜ｳ縺吶�繝ｭ繧ｰ繝ｩ繝�(蛟咲ｲｾ蠎ｦ)
!  螻･豁ｴ
!  2013/04/25 譚第ｩ九遨ｶ逅�渕縲菴懈�

program ex3_double
implicit none

real(8) :: x    ! 2荵励ｒ蜈･繧後ｋ螟画焚
real(8) :: res  ! 邨先棡繧貞�繧後ｋ螟画焚

! 螟画焚縺ｮ蛻晄悄蛹�
x = 0.0d0
res = 0.0d0

write(*, *) "x=0.0, 0.1, ..., 1.0縺ｮ2荵励�蜥�"

! x=0.0, 0.1, ..., 1.0縺ｮ2荵励ｒ雜ｳ縺吶Ν繝ｼ繝� 髢句ｧ�
do while (x <= 1.0d0)
   res = res + x**2
   x = x + 0.1d0
   write(*, *) "x =", x
enddo
! x=0.0, 0.1, ..., 1.0縺ｮ2荵励ｒ雜ｳ縺吶Ν繝ｼ繝� 邨ゆｺ�

!邨先棡縺ｮ譖ｸ縺榊�縺�
write(*, *) "x  =", x, res

end program ex3_double