module info_module type date integer :: day integer :: month integer :: year end type date type personal character (len=20) :: first_name character (len=20) :: other_names character (len=40) :: surname type (date) :: date_of_birth character (len=1) :: sex end type personal end module info_module program ch1703a use info_module implicit none type (personal):: p print*,'type in your personal details:' print*,'first name:' read '(a)',p%first_name print*,'other names:' read '(a)',p%other_names print*,'surname:' read '(a)',p%surname print*,'type in date of birth:' print*,'day:' read*,p% date_of_birth %day print*,'month:' read*,p% date_of_birth %month print*,'year:' read*,p%date_of_birth%year print*,'your sex (m/f)' read '(a)',p%sex ! ! a print out of your details ! write(*,fmt=10) 10 format(1x, 'a printout of your personal details'/) write(*,fmt=20) p%first_name,& p%other_names,& p%surname,& p%date_of_birth%day,& p%date_of_birth%month,& p%date_of_birth%year,& p%sex 20 format(1x,a20,a20,a40,/,i2,1x,i2,1x,i4,/,a1) end program ch1703a