View Code of Problem 3496

#include<bits/stdc++.h>      
using namespace std;
void find(int,int);
int main(){
	char a[1000];
	int k;
	while(gets(a)){
		for(int i = 0;i<strlen(a);i+=3){
			if(a[i]=='y'&&a[i+1]=='o'&&a[i+2]=='u'){
				a[i] = 'w';
				a[i+1] = 'e';
				for( k = i+2;k<strlen(a);k++)a[k] = a[k+1];				 
			}
		}
		printf("%s\n",a); 
		memset(a,0,sizeof(a));
	}
	
	return 0;
}

/*
F:\temp\21436412.629922\Main.cc:2:30: error: bits/stdc++.h: No such file or directory
F:\temp\21436412.629922\Main.cc: In function 'int main()':
F:\temp\21436412.629922\Main.cc:8: error: 'gets' was not declared in this scope
F:\temp\21436412.629922\Main.cc:9: error: 'strlen' was not declared in this scope
F:\temp\21436412.629922\Main.cc:16: error: 'printf' was not declared in this scope
F:\temp\21436412.629922\Main.cc:17: error: 'memset' was not declared in this scope
*/

Double click to view unformatted code.


Back to problem 3496