This is for reading in your file:
integer :: i
real :: a, b
open( file='filename.txt', unit=1234, status='old' )
read(1234,*) i
read(1234,*) a
read(1234,*) b
close(1234)
And this is for casting a string to real
using internal I/O:
character(len=10) :: str = '1.23e1'
real :: a
read(str,*) a