Skip to content

Instantly share code, notes, and snippets.

@invatainfo
Created September 16, 2017 15:01
Show Gist options
  • Save invatainfo/e970c8360e6d240ff47fc8b77842fec8 to your computer and use it in GitHub Desktop.
Save invatainfo/e970c8360e6d240ff47fc8b77842fec8 to your computer and use it in GitHub Desktop.
#include <iostream.h>
#include <string.h>
void main() {
char s[251], i;
cin.get(s, 251);
for (i = 0; i < strlen(s) - 1; i++)
if (s[i] == s[i + 1] && s[i] != '*')
cout << s[i] << s[i + 1] << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment