Seems like you want to create a string to store all the combinations, before you hit endline?
(Been a while since I did C++ so you have to check the code)
string myOutput = "";
if (n % 2 == 0)
{
myOutput+="Bat";
}
if (n % 3 == 0)
{
myOutput+="Man";
}
if (n % 5 == 0)
{
myOutput+="Cave";
}
cout<<myOutput <<endl;