fortran90 中输入一个字母,显示它是大写还是小写,我编的老是有问题,求高手解答
implicitnoneCHARACTER::i,cread*,i,cc=iachar(i)ifc>=65.and.c<=90thenprint*,"输入的是大写字母"e...
implicit none
CHARACTER ::i,c
read*,i,c
c=iachar(i)
if c>=65.and.c<=90 then
print*,"输入的是大写字母"
else
if c>=97.and.c<=122 then
print*,"输入的是小写字母"
endif
end 展开
CHARACTER ::i,c
read*,i,c
c=iachar(i)
if c>=65.and.c<=90 then
print*,"输入的是大写字母"
else
if c>=97.and.c<=122 then
print*,"输入的是小写字母"
endif
end 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询