#include <iostream>
#include <string>
std::string remove_repeated_letters(std::string word)
{
constchar* w = word.c_str();
std::string result = {};
for (int count = 1; count <= word.size(); count ++)
{
if (w[count] != w[count - 1])
{
result += w[count - 1];
}
}
return result;
}
int main ( )
{
std::string input;
std::cout << " Enter word to test : ";
std::cin >> input;
std::string result = remove_repeated_letters(input);
std::cout << " Your word without repeated letters is : " << result
<< "\n Is your word \"banana\"?" << "\tThe answer is : ";
if (result == "banana") std::cout << "Yes";
else std::cout << "No";
}