cout<<(char)toupper(s);

This should be tolower and not toupper.