find the output in numeric variable
Attachments:
Answers
Answered by
0
Answer:
8
Explanation:
D = A + B = 8 + 10 = 18
R = D % 2 = 18 % 2 = 0
SO it goes into if ( R = 0) and prints A which is 8
Answered by
0
Required Answer:-
Correct C∅de:
A = 8
B = 10
D = A + B
R = D MOD 2
IF R = 0 THEN
PRINT A
ELSE
PRINT B
END IF
END
To Find:
- The output (Language: QBASIC)
Output:
→ 8
Explanation:
It's given that,
→ A = 8
→ B = 10
So,
→ D = A + B
→ D = 8 + 10
→ D = 18
Now,
→ R = D MOD 2
→ R = 18 MOD 2
→ 18 divided by 2 leaves remainder - 0
→ R = 0
So, R = 0 is true.
→ If block will execute.
→ Output: 8
•••♪
Similar questions