Advertisement
Drucik

tak

Sep 19th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <string>
  2. using namespace std;
  3. int main()
  4.  
  5.  
  6. {
  7. string ciag;
  8. char wyjscie;
  9. wyjscie='Q';
  10. do {
  11.  
  12.  
  13. cout<< "podaj wyraz: ";
  14. cin>>ciag;
  15.  
  16. cout<<ciag[0]<<endl;
  17. cout<<ciag[ciag.size()-1]<<endl;
  18.  
  19.  
  20. cout<< "Press q to exit: "
  21.  
  22. cin>>wyjscie;
  23.  
  24. }
  25. while(wyjscie!='q');
  26. cin.get();
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement