find the output
10 LET N=1
20 LET X=25
30 LET Y=10
40 C=X-Y
50 PRINT C
60 N=N+1
70 IF N<5 THEN 20
80 END
Answers
Answered by
1
Required Answer:-
Given C∅de:
10 LET N=1
20 LET X=25
30 LET Y=10
40 C=X-Y
50 PRINT C
60 N=N+1
70 IF N<5 THEN 20
80 END
Corrected C∅de:
10 LET N=1
20 LET X=25
30 LET Y=10
40 C=X-Y
50 PRINT C
60 N=N+1
70 IF N<5 THEN GOTO 20
80 END IF
90 END
Output:
15
15
15
15
Explanation:
It's given that,
>> N = 1
>> X = 25
>> Y = 10
>> C = X - Y = 15
The above program prints the value of C only if N < 5 is true. So, it prints the value of C four times.
Similar questions
Math,
1 month ago
Math,
1 month ago
Hindi,
3 months ago
Social Sciences,
3 months ago
Math,
9 months ago