program whatkinds

  implicit none
  integer :: i,ik
  
  i = 1
  do 
    ik = selected_int_kind(i)
    write(*,'(a19,i2,a4,i10)') 'selected_int_kind(',i,') = ',ik
    if (ik < 0) exit 
    i = i+1
  enddo

  write(*,*) '********************************************************'

  i = 1
  do 
    ik = selected_real_kind(i)
    write(*,'(a19,i2,a4,i10)') 'selected_real_kind(',i,') = ',ik
    if (ik < 0) exit 
    i = i+1
  enddo

  write(*,*) '********************************************************'

  i = 1
  do 
    ik = selected_real_kind(5,i)
    write(*,'(a21,i3,a4,i10)') 'selected_real_kind(5,',i,') = ',ik
    if (ik < 0) exit 
    i = i+1
  enddo

end program whatkinds
