Driver program to test above function
int main ( ) { int R = 0 , G = 0 , B = 0 ; cout << convertRGBtoHex ( R , G , B ) << endl ; R = 255 , G = 255 , B = 255 ; cout << convertRGBtoHex ( R , G , B ) << endl ; R = 25 , G = 56 , B = 123 ; cout << convertRGBtoHex ( R , G , B ) << endl ; R = 2 , G = 3 , B = 4 ; cout << convertRGBtoHex ( R , G , B ) << endl ; R = 255 , G = 255 , B = 256 ; cout << convertRGBtoHex ( R , G , B ) << endl ; return 0 ; }