Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- /* run this program using the console pauser or add your own getch, system("pause") or input loop */
- using namespace std;
- int main() {
- string ciag;
- char wyjscie;
- do{
- cout<<"podaj wyraz: "<<endl;
- cin>>ciag;
- cout<<ciag[0]<<endl;
- cout<<ciag[ciag.size()-1];
- cout<<"Chcesz wyjsc? jesli tak to q";
- cin>>wyjscie;
- }
- while(wyjscie!='q');
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement