求高手帮忙fortran中的错误:An ENDIF occurred without a corresponding IF THEN or ELSE statement

doii=1,80dojj=1,80if(((y.ge.((jj-1)*1000-20000)).and.(y.lt.(jj*1000-20000)).and.&((x.... do ii=1,80
do jj=1,80

if (((y.ge.((jj-1)*1000-20000)).and.(y.lt.(jj*1000-20000)).and.
& ((x.ge.((ii-1)*1000-20000)).and.(x.lt.(ii*1000-20000))) then
aa(ii,jj)=aa(ii,jj)+1
goto 1
end if
end do
1 end do

错误: Error: Syntax error, found IDENTIFIER 'THEN' when expecting one of: * :: , <END-OF-STATEMENT> ; : ) + . - (/ [ ] /) ** / > // .LT. < ...
& ((x.ge.((ii-1)*1000-20000)).and.(x.lt.(ii*1000-20000))) then
Error: An ENDIF occurred without a corresponding IF THEN or ELSE statement.
end if
展开
 我来答
死亡de舞
2011-09-02 · TA获得超过2.6万个赞
知道大有可为答主
回答量:2299
采纳率:50%
帮助的人:2343万
展开全部
主要是括号不匹配 少了两个右括号 导致 IF语句判断出现问题
你试试下面的代码

do ii=1,80
do jj=1,80
if (((y.ge.((jj-1)*1000-20000)).and.(y.lt.(jj*1000-20000))).and.((x.ge.((ii-1)*1000-20000)).and.(x.lt.(ii*1000-20000)))) then
aa(ii,jj)=aa(ii,jj)+1
goto 1
end if
end do
1 end do
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式