in the variable
The value will take at least 1 item
Value is the value of the cost.
Only we need to create two variables.
To increase the count, I assigned #SetCont to the first variable. Whenever onetime click, I aim to add one item to the count. As a result, I chose Addition in the #SetCont variable and set it to 1.
I assigned the value of #Cost to the second variable. Then, I used the same multiplication to declare the #SetCount variable, which multiplied Item 1 by 1, Item 2 by 2, Item 3 by 3, and so on until the last item was multiplied by its respective number.
To calculate the total cost, one needs to multiply the price of each item and add them together. However, there could be an issue when the program switches from binary operators to numbers during multiplication. It seems to make mistakes Xⁿ in this transition.
When an item is added, the variable performs well.
Because it is not convenient to do operations with multiplication
After building a new #Price variable, it started working fine.
#Cost Value and #Price are the same value 10 in the variable.