       implicit none   
       real :: vb, lb, ab, bb, w, si
         print *,"梁の長さを入力して下さい"
          read *,lb
         print *,"変位を入力して下さい"
          read *,w

     do ab=1.,31415926.

        bb=lb*cos(ab*1.d-7)+w*ab*1.d-7

     if(bb>lb-1.d-7  .and. bb<lb+1.d-7) then
          si=ab*1.d-7

          vb=-(lb/si)*sin(si)+lb


         print *,"長さ方向変位は：",vb


           end if
         end do
       end

