Need some Help!

Use if condition after cin>>r
1
2
3
4
5
6
7
8
9
10
11
12
if(r == 'r')
{
     //  Do red
}
else if(r == 'g')
{
     // do green
}
else if(r == 'b')
{
    // do blue 
}
Last edited on
Thanks!

will i need to do the if statements after

cin>>g and cin>>b ??
Why are you taking different variable you can use only single variable and according to the value of that variable you can print your color screen..
Umm, in which excatly language is "aaaa"? Neither me nor Google translate have been sucessful in decoding that phrase!
he obviously decided his code was top-secret and deleted it as soon as he got his answer.
Last edited on
Topic archived. No new replies allowed.