0
How to use boolean type variable in a proper program?
4 Answers
+ 16
here is an example ,
suppose u want to find prime number , initially boolean b=true; ,
when n%a==0 ... u can change value of b to false & after the loop if b=true then n is prime , else not prime
+ 1
yes
0
$
0
http://leakyegg.website.tk/RGB.zip
I wrote this as my first program.. I made it store and load saved colors with the difference being the position of a switch. That switch runs a boolean variable. Boolean is basically just a switch so it was perfect. Switch set to save position, the variable value is "true" .. Set to load, the variable value is "false"