program abc123implicit nonecharacter(len=10)::a(5)=(/"afdfdfsd","asfdsfgdg","gfgergdfd","fwegsddfd","fdsgergfs"/) !需要提取字符串的数组character(len=2)::b(5)character(len=10)::xinteger::ido i=1,5x=a(i)b(i)=x(1:2) !提取前两位end dodo i=1,5write(*,*)b(i)enddostopend
结果是