Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- using namespace std;
- int main()
- {
- string ciag;
- char wyjscie;
- wyjscie='Q';
- do {
- cout<< "podaj wyraz: ";
- cin>>ciag;
- cout<<ciag[0]<<endl;
- cout<<ciag[ciag.size()-1]<<endl;
- cout<< "Press q to exit: "
- cin>>wyjscie;
- }
- while(wyjscie!='q');
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement