Advertisement
GerexD

suli//fel4--6

Oct 16th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. string mondat,uj="",szo;
  7. cout<<"adj meg 1 mondatot: ";
  8. getline(cin,mondat);
  9. mondat=mondat+' ';
  10. while(mondat!="")
  11. {
  12. int p=mondat.find(" ");
  13. szo=mondat.substr(0,p);
  14. mondat.erase(0,p+1);
  15. if(mgh.find(szo[0])!=-1)
  16. {
  17. string ford="";
  18. for(int i=0;i<szo.length();i++)
  19. ford=szo[i]+ford;
  20. uj=uj+ford+" ";
  21. }
  22. }
  23. cout<<uj;
  24.  
  25.  
  26. return 0;
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement