fortran编写程序去除空格为什么不能直接用trim函数呢
programmainimplicitnonecharacter::string,awrite(*,*)"请输入含有空格的字符串"read(*,*)stringa=tri...
program main
implicit none
character::string,a
write(*,*)"请输入含有空格的字符串"
read(*,*)string
a=trim(string)
write(*,*)a
end 展开
implicit none
character::string,a
write(*,*)"请输入含有空格的字符串"
read(*,*)string
a=trim(string)
write(*,*)a
end 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询