I want the dynamic output for a particular condition, and my condition is :
size = 3;
countersize = 8; //can be anything based on the user input.
If I got the countersize as 4 or 5 or 8, then my output should be any one of these 0 or 1 or 2 for a particular countersize. The output should be < 3.
Example1:
**user Input:** countersize=7 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=5 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=3 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=0 then output=0
**user Input:** countersize=1 then output=1
**user Input:** countersize=2 then output=2
**user Input:** countersize=4 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=9 then output= 0 or 1 or 2 (only one from these)
Example2 : suppose size = 2; and countersize = 8;// can be anything based on the user input.
**user Input:** countersize=7 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=5 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=3 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=0 then output=0
**user Input:** countersize=1 then output=1
**user Input:** countersize=2 then output=0 or 1 or 2 (only one from these)
**user Input:** countersize=4 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=9 then output= 0 or 1 or 2 (only one from these)
Please help me with my Java code.