#include<iostream> #include<cstring> 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]; } return 0; } /* F:\temp\21670714.97701\Main.cc: In function 'int main()': F:\temp\21670714.97701\Main.cc:7: error: 'gets' was not declared in this scope */ |
Double click to view unformatted code.