0

How decrease remaining items after each use?

I am making a vending machine program. I want the program to count how much is left after an item is sold but it always resets the remaining amount to 30 instead of 28 after being used once https://www.sololearn.com/Codes?ordering=MyCodes&query=&language=

23rd Nov 2022, 4:49 AM
Alejandro Moran
Alejandro Moran - avatar
4 Answers
+ 3
Alejandro Moran There is + New Code Just swipe Create section right to left
23rd Nov 2022, 5:40 AM
A͢J
A͢J - avatar
+ 1
Please attempt the code first, click the right '+' icon and then click insert code on the top left side you can see drop-down menu and then click my code bits and share the code
23rd Nov 2022, 4:54 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
I dont see any '+' in the Playground.
23rd Nov 2022, 5:22 AM
Alejandro Moran
Alejandro Moran - avatar
0
Alright, i shared the code and put the link under the question
23rd Nov 2022, 5:28 PM
Alejandro Moran
Alejandro Moran - avatar