BASIC新手的问题
10INPUTX20IFX=00THENPRINT"JIESHU":END30IFX<=400THENGOTO40ELSEGOTO5040Y=X*0.0550IFX>40...
10 INPUT X
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 50
40 Y=X*0.05
50 IF X>400 THEN GOTO 60
60 Y=0.10
70 PRINT Y
80 GOTO 10
RUN
?100
10
?300
30
400
OK
为什么会这样。小于400该*0.5怎么也*1了?
另外
10 INPUT X
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 50
40 Y=X*0.05
50 IF X<=400 THEN GOTO 60 else goto 70
60 Y=X*0.10
70 IF X<=800 THEN GOTO 80 ELSE GOTO 90
80 Y= X*0.15
90 FIX<=1500 THEN GOTO 100 ELSE GOTO 110
100 Y=X*0.2
110 IF X>1500 THEN GOTO 120
120 Y=X*0.3
130 PRINT Y
140 GOTO 10
RUN
? 400
SYNTAX ERROR IN40
OK
40 X*.05
怎么就语法错误了? 展开
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 50
40 Y=X*0.05
50 IF X>400 THEN GOTO 60
60 Y=0.10
70 PRINT Y
80 GOTO 10
RUN
?100
10
?300
30
400
OK
为什么会这样。小于400该*0.5怎么也*1了?
另外
10 INPUT X
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 50
40 Y=X*0.05
50 IF X<=400 THEN GOTO 60 else goto 70
60 Y=X*0.10
70 IF X<=800 THEN GOTO 80 ELSE GOTO 90
80 Y= X*0.15
90 FIX<=1500 THEN GOTO 100 ELSE GOTO 110
100 Y=X*0.2
110 IF X>1500 THEN GOTO 120
120 Y=X*0.3
130 PRINT Y
140 GOTO 10
RUN
? 400
SYNTAX ERROR IN40
OK
40 X*.05
怎么就语法错误了? 展开
1个回答
展开全部
应该改为:
10 INPUT X
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 60
40 Y=X*0.05
50 GOTO70
60 Y=0.10
70 PRINT Y
80 GOTO 10
应该改为:
10 INPUT X
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 50
40 Y=X*0.05
45 GOTO 130
50 IF X<=800 THEN GOTO 60 else goto 70
60 Y=X*0.10
65 GOTO 130
70 IF X<=1200 THEN GOTO 80 ELSE GOTO 90
80 Y=X*0.15
85 GOTO 130
90 IF X<=1500 THEN GOTO 100 ELSE GOTO 110
100 Y=X*0.2
105 GOTO 130
110 Y=X*0.3
130 PRINT Y
140 GOTO 10
10 INPUT X
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 60
40 Y=X*0.05
50 GOTO70
60 Y=0.10
70 PRINT Y
80 GOTO 10
应该改为:
10 INPUT X
20 IF X=00 THEN PRINT "JIESHU" :END
30 IF X<=400 THEN GOTO 40 ELSE GOTO 50
40 Y=X*0.05
45 GOTO 130
50 IF X<=800 THEN GOTO 60 else goto 70
60 Y=X*0.10
65 GOTO 130
70 IF X<=1200 THEN GOTO 80 ELSE GOTO 90
80 Y=X*0.15
85 GOTO 130
90 IF X<=1500 THEN GOTO 100 ELSE GOTO 110
100 Y=X*0.2
105 GOTO 130
110 Y=X*0.3
130 PRINT Y
140 GOTO 10
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询