+ 3
What about logic?
For example, the game "guess the number." Let's say I want to give the user some settings: numbers from 0 to 100, from 100 to 1000, nums with decimal ... Should I enumerate for the program all possible options for the settings? I.e: --if(1 || 2 || 3) { -----if (1 && 2) { -------if( 1 && 2 && 3) { code } } -----if(1 && 3) {code} etc. ??
5 Answers
+ 9
No, you could use a sorting algorithm like this one.
https://code.sololearn.com/WH0xro6Iz123/?ref=app
+ 3
If you are talking about setting for a game
https://code.sololearn.com/W16L6RLpXVKI/?ref=app
+ 1
yes
+ 1
I don;t understand, how it can work with my example :(
How it must works with checkbox?
0
At all, i still don't understand T_T
Yes, we get array with 'checked', but what next?
How does this frees me from enumerating all possible options for the settings?