WR Home      Topic Home      Chapter:  1  2 
<Previous Next>

Chapter 02

Blinking the LEDs in a more controlled way !

Page 7

Switching the LEDs in a more controlled way !


There are 8-LEDs connected to the port.
Now, develop a program, which asks eight questions:
  1. Do You want to switch ON LED# 1 ? Yes/No
  2. Do You want to switch ON LED# 2 ? Yes/No
  3. Do You want to switch ON LED# 3 ? Yes/No
  4. ....
  5. ....
  6. ....
  7. ....
  8. Do You want to switch ON LED# 8 ? Yes/No


.. and once the eight answers are received the, LEDs must be switched accordingly.
Write a program to solve the above problem of "composing a customized byte"


OR scroll down for the solution
















WR Home      Topic Home      Chapter:  1  2 
<Previous Next>