A panel has 3 switches on the front which toogle options. the state of all these buttons(on or off) must bestored in a single integer variable(not an array). How this information gets to the computer is irrelevant. Using C# or Java, write briefly the function ofsetting each button state in the variable andreading off any particular button state from the variable. Create unique global constants for each button, simply write them and the functions down and not the entire program
I don't know the syntax but you could easily do this with setting the switches to a constant, then adding them up. The number set would need to be something so that there would only be one solution...the one that you were looking for.
sw1 = 1
sw2 = 2
sw3 = 4
If sw1 and sw2 is both on, but sw3 is off, the number would be 3
If sw2 and sw4 was on, the number would be 6
If all were on, the number would be 7, etc.
Using photran 5.0 on eclipse (galileo) 3.5. I am having problems using large integers and reals in...
(More)
Using photran 5.0 on eclipse (galileo) 3.5. I am having problems using large integers and reals in calculations, at the moment i am only able to use up to 3E+47, but have no idea how to use larger numbers, i have read this is possible but dont know how to impliment.
How do you get around the problem of large Integers and Reals within photran eclipse? The maximum I...
(More)
How do you get around the problem of large Integers and Reals within photran eclipse? The maximum I can use is around 3E+47, I know it is possible to use larger but have no idea how to use larger numbers for calculations.
Got the Christmas edition r4 upgrade but can't get past the loading screen, not had this problem on...
(More)
Got the Christmas edition r4 upgrade but can't get past the loading screen, not had this problem on other upgrade cards