[求助]麻烦哪位高手给小弟解答一下,谢谢了
program main
implicit none
character(len=80) a,b
integer c,d,e
write(*,*) "请输入字符串:"
read(*,"(A80)") a
d=1
c=len_trim(a)
do e=1,c,1
if(a(e:e)/=' ') then
b(d:d)=a(e:e)
d=d+1
end if
end do
write(*,"(A80)") b 本人现在正在学fortran 上面是我编的程序 为什么在read处加不加"(A80)"计算的结果不一样呢
end
program main
implicit none
character(len=80) a,b
integer c,d,e
write(*,*) "请输入字符串:"
read(*,"(A80)") a
d=1
c=len_trim(a)
do e=1,c,1
if(a(e:e)/=' ') then
b(d:d)=a(e:e)
d=d+1
end if
end do
write(*,"(A80)") b
end
本人现在正在学fortran 上面是我编的程序 为什么在read处加不加"(A80)"计算的结果不一样呢
implicit none
character(len=80) a,b
integer c,d,e
write(*,*) "请输入字符串:"
read(*,"(A80)") a
d=1
c=len_trim(a)
do e=1,c,1
if(a(e:e)/=' ') then
b(d:d)=a(e:e)
d=d+1
end if
end do
write(*,"(A80)") b 本人现在正在学fortran 上面是我编的程序 为什么在read处加不加"(A80)"计算的结果不一样呢
end
program main
implicit none
character(len=80) a,b
integer c,d,e
write(*,*) "请输入字符串:"
read(*,"(A80)") a
d=1
c=len_trim(a)
do e=1,c,1
if(a(e:e)/=' ') then
b(d:d)=a(e:e)
d=d+1
end if
end do
write(*,"(A80)") b
end
本人现在正在学fortran 上面是我编的程序 为什么在read处加不加"(A80)"计算的结果不一样呢
[此贴子已经被作者于2011-3-16 0:19:27编辑过]