Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.     string word;
  6.     char temp;
  7.  
  8.     cin>>word;
  9.  
  10.     cout<<"liczba liter wprowadzonego wyrazu: "<<word.length()<<endl;
  11.     temp = word[word.length()-1];
  12.     word[word.length()-1] = word[0];
  13.     word[0]=temp;
  14.     cout<<"wyraz po zamianie liter: "<<word<<endl;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement