Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string mondat,uj="",szo;
- cout<<"adj meg 1 mondatot: ";
- getline(cin,mondat);
- mondat=mondat+' ';
- while(mondat!="")
- {
- int p=mondat.find(" ");
- szo=mondat.substr(0,p);
- mondat.erase(0,p+1);
- if(mgh.find(szo[0])!=-1)
- {
- string ford="";
- for(int i=0;i<szo.length();i++)
- ford=szo[i]+ford;
- uj=uj+ford+" ";
- }
- }
- cout<<uj;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement