View Code of Problem 3924

#include<iostream>
using namespace std;
#include<string>
int main()
{
	string str;
	cin>>str;
	int i=0;
	while(i<str.size())
	{
		cout<<str[i];
		char c=str[i];
		while(str[i]==c)
		{
			i++;
		}
	}
}

Double click to view unformatted code.


Back to problem 3924