#include <iostream>
#include <string>
using namespace std;
int main() {
string tekstJawny = "Kasia Kowalska";
for (int i = 0; i < tekstJawny.length() - 1; i += 2)
swap(tekstJawny[i], tekstJawny[i + 1]);
cout << tekstJawny << endl;
return 0;
}
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
#include <iostream>
#include <string>
using namespace std;
int main() {
string tekstJawny = "Kasia Kowalska";
for (int i = 0; i < tekstJawny.length() - 1; i += 2)
swap(tekstJawny[i], tekstJawny[i + 1]);
cout << tekstJawny << endl;
return 0;
}