The information about colours is to be stored in bits of a variable called colour. The bit
number 0 to 7, each represent 8 colours of a rainbow, i.e. bit 1 represents Blue, 2 represents Green,
and so on (see table below). Write a C++ program that asks the user to enter a number and based on
this number, an eight lined rainbow (of asterisks *) is to be displayed, such that, if the bit is ON,
respective colour is displayed otherwise black line is drawn (not visible).
If you're going to show no effort, don't bother posting. If you have no idea where to start, then you can start with the first page of whatever C++ course book you have.
no that is not the case i have done all the problems of my assignment (functions, case ,if else etc) except for these questions i havent studied bitwise in detail