Computer Science, asked by shresthasitaram441, 3 months ago

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 anindyaadhikari13
1

Required Answer:-

Given Cde:

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