debug : CLS
A = APPLE
FOR X = 1 TO LEN$ (A$)
PRINT RIGHT (X,A$)
NEXT 1
END
Answers
Answered by
7
Your Approach:
CLS
A = APPLE
FOR X = 1 TO LEN$ (A$)
PRINT RIGHT (X,A$)
NEXT 1
END
Where is the mistake?
- Line no. 2 , A=APPLE , String should be enclosed with double quotes ("") also, for storing string there should be $ symbol after variable name.
- Line no. 3 It should be LEN() not LEN$()
- Line no. 4 RIGHT$(A$,X) and string variable should come first in the parameter
- Line no. 5 It should be Next I not Next 1
CORRECTED CÓDE:-
CLS
A$= "APPLE"
FOR X = 1 TO LEN (A$)
PRINT RIGHT$(A$,X)
NEXT I
END
Similar questions
Math,
1 month ago
Computer Science,
1 month ago
English,
1 month ago
English,
3 months ago
Computer Science,
3 months ago
Math,
10 months ago
English,
10 months ago