Find the output
10 LET A=10
20 LET B=15
30 LET C=A+B
40 PRINT "C"
50 LET A=10
60 LET B=15
70 LET C=A+B
80 PRINT C
Answers
Answered by
2
Given C∅de:
10 LET A=10
20 LET B=15
30 LET C=A+B
40 PRINT "C"
50 LET A=10
60 LET B=15
70 LET C=A+B
80 PRINT C
Language: QBASIC
Output:
C
25
Explanation:
- Line 10: It initialises A = 10
- Line 20: It initialises B = 15
- Line 30: It initialises C = A + B. C becomes 25.
- Line 40: This displays the string "C". Output: C.
- Line 50: Again, it initialises A = 10
- Line 60: B becomes 15.
- Line 70: C is the sum of A and B which is = 15 + 10 = 25.
- Line 80: Displays the value of C i.e., 25
Hence, output will be –
C
25
Similar questions