Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3.  
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9.  
  10.     string ciag;
  11.     char wyjscie;
  12.  
  13.     do{
  14.  
  15.        
  16.         cout<<"podaj wyraz: "<<endl;
  17.         cin>>ciag;
  18.            
  19.         cout<<ciag[0]<<endl;
  20.         cout<<ciag[ciag.size()-1];
  21.        
  22.         cout<<"Chcesz wyjsc? jesli tak to q";
  23.         cin>>wyjscie;
  24.        
  25. }
  26. while(wyjscie!='q');
  27.  
  28.    
  29.     cin.get();
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement