program vectorsub

  implicit none
  integer, dimension(5) :: mysub = (/ 10, 4, 3, 8, 10 /)
  integer, dimension(10) :: x = (/ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 /)

  write(*,*) x 
  write(*,*) x(mysub)
  x(mysub) = 100
  write(*,*) x 

end program vectorsub
