6.0a: Boolean Challenge
In this module, we'll attempt to conquer some boolean challenges.
File Location
Right click on the solution.
Go to Add > New Project.
Select Console App (.NET Framework) and name it
06_boolean_challenges
.Write your code for this module within
Program.cs
of that project.
The following challenges will build upon the code from the last challenge, reproduced here:
Bronze Challenge
In addition to printing true if the value is 50, print false if it is not 50.
Silver Challenge
In the example above, change 100
to 101
, you still get true
, but 101/2 is not 50. How can you handle this?
Gold Challenge
Create a program where the user has to guess what number the program is thinking of. The user will enter in a number, then the program will hit different boolean logic and spit some data back to the user telling them whether they need to go higher or lower. In this challenge you can just pick the winning number.
Last updated