View Code of Problem 3496

#include<iostream>
#include<cstring>
#include<string>
using namespace std;
int main(){
	char a[1200],fin[1200];
	while(gets(a)){
		int op = 0;
		for(int i = 0;i<strlen(a);i++){
			if(a[i] == 'y' && a[i+1] == 'o' && a[i+2] == 'u'){
				fin[op++] = 'w';
				fin[op++] = 'e';
				i+=2;
			}else{
				fin[op++] = a[i];
			}
		}
		for(int i = 0;i<op;i++)cout<<fin[i];
		cout<<endl;
	}
	return 0;
} 
/*
F:\temp\21670720.97707\Main.cc: In function 'int main()':
F:\temp\21670720.97707\Main.cc:8: error: 'gets' was not declared in this scope
*/

Double click to view unformatted code.


Back to problem 3496