The Total solution for NCERT class 6-12
ITEM
SCANNED
OPERATION
STACK
100
PUSH 100
40
PUSH 40
100,40
8
PUSH 8
100,40,8
/
POP 8 POP 40 EVALUATE 40/8 =5 PUSH 5
100,5
20
PUSH 20
100,5,20
10
PUSH 10
100, 5, 20, 10
POP 10 POP 20 EVALUATE 20-10 =10 PUSH 10
100,5,10
+
POP 10 POP 5 EVALUATE 10 + 5= 15 PUSH 15
100,15
*
POP 15 POP 100 EVALUATE 100 * 15 = 1500 PUSH 1500
1500