Print the answer converting into hexadecimal
stringstream ss ; ss << hex << ans ; string su = ss . str ( ) ; transform ( su . begin ( ) , su . end ( ) , su . begin ( ) , :: toupper ) ; cout << ( su ) ; }