编辑: 645135144 | 2015-05-06 |
第二节 IF语句 PROGRAM EX0407 IMPLICIT NONE INTEGER SCORE CHARACTER GRADE WRITE (*,*) "SCORE:" READ (*,*) SCORE IF (SCORE>=90 .AND. SCORE=80 .AND. SCORE=70 .AND. SCORE=60 .AND. SCORE=0 .AND. SCORE100 .OR. SCORE=90 .AND. SCORE=80 .AND. SCORE=70 .AND. SCORE=60 .AND. SCORE=0 .AND. SCORE100) THEN GRADE='?' ELSE IF (SCORE>=90) THEN !会执行到此,代表SCORE=80) THEN !会执行到此,代表SCORE=70) THEN !会执行到此,代表SCORE=60) THEN !会执行到此,代表SCORE=0) THEN !会执行到此,代表SCORE0 ) THEN IF (Y>0) THEN ! X>0,Y>0 ANS=1 ELSE IF (Y0, Y0, Y=0 ANS=0 END IF ELSE IF (X0) THEN ! X0 ANS=2 ELSE IF (Y