fork download
  1. #include<iostream>
  2. using namespace std;
  3. class DoubleE
  4. {
  5. public:
  6. int i=0,b;
  7. string str;
  8. int count=0;
  9. DoubleE()
  10. {
  11.  
  12. }
  13. void eeWord()
  14. {
  15. cout<<"enter string";
  16. getline (cin,str);
  17.  
  18. b=i;
  19. for(i=0;str[i]!='/0';i++)
  20. {
  21. if(str[i]=='e')
  22. count++;
  23. if(str[i]==' ')
  24. {
  25. if(count>=2)
  26. {
  27. for(int j=b;j<i;j++)
  28. {
  29. cout<<str[j];
  30. }
  31. cout<<endl;
  32. }
  33. b = i;
  34. count=0;
  35. }
  36. }
  37. }
  38. };
  39. int main()
  40. {
  41. DoubleE d= DoubleE();
  42. d.eeWord();
  43. return 0;
  44. }
Runtime error #stdin #stdout 0s 16056KB
stdin
Feet and loot breed
stdout
enter stringFeet