#include <iostream> using namespace std; int main(int argc, char *argv[]) { char f,n; while((n=getchar())!=EOF){ if(n!=f){ printf("%c",n); f = n; } } }
Double click to view unformatted code.