Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- string word;
- char temp;
- cin>>word;
- cout<<"liczba liter wprowadzonego wyrazu: "<<word.length()<<endl;
- temp = word[word.length()-1];
- word[word.length()-1] = word[0];
- word[0]=temp;
- cout<<"wyraz po zamianie liter: "<<word<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement