SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. #include<algorithm>
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main()
  9. {
  10.     string imie;
  11. cout<<"podaj imie"<<endl;
  12. cin>>imie;
  13. int dlugosc_imienia=imie.length();
  14. cout<<"dlugosc: "<<dlugosc_imienia<<endl;
  15. if(imie[dlugosc_imienia-1]=='a')
  16.     cout<<"wydaje mi sie ze jestes kobieta"<<endl;
  17. else cout<<"wydaje mi sie ze jestes mezczyzna"<<endl;
  18.  
  19. string wyraz;
  20. cout<<"podaj wyraz do odwrocenia bez spacji";
  21. cin>>wyraz;
  22.  
  23. int dlg=wyraz.length();
  24. for(int i=dlg-1; i>=0; i--)
  25. {
  26.     cout<<wyraz[i];
  27. }
  28.  
  29.     return 0;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top