How to keep the integer variable a constant number?

Hello everyone, I am trying to keep an integer variable to return an exact number because of a counter thats constantly increasing is there any way for me to do this?

image
column 1 and 4 are constants
column 5 is the output, column 6 is what is necessary to get the expected output which is 14
column 3 which contains 9s were a bad attempt to retrieve an output for 14 (second row)

@lmoham,

Plz forgive if i misunderstood you.
You can hardcore integer number that you want constant or static.

the supposed formula contains other variables, the 2 and 7 are constants, the counter is not a constant, the 9 was a bad attempt at returning 14(second row), 5th column is the output, but the expected output for all of them is 14 only

I used a while loop and the condition within it if variable != expected output
within while loop was an if statement
if more than expected output assign -1 to variable
if less than expected output assign +1

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.