View Code of Problem 3924

#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
	char f,n;
	
	while(scanf("%c",&n)!=EOF){
		if(!f){
		    f=n;
			printf("%c",f);
		}
		if(n!=f){
			printf("%c",n);
			f = n;
		}
 		
	}
	
}

Double click to view unformatted code.


Back to problem 3924