C++ check entered string if repeated same character in string again "Taaseep" then show output it as "tasep" program
void main()
{
string a = "azzfghk";
int i=0;
while(i<a.length())
{
if(a[i]==a[i+1])
{
cout<<a[i];
i=i+2;
}
else
{
cout<<a[i];
i++;
}
}
}
