#include <iostream>
#include <string>
using namespace std;
int main()
{
string slowo;
cout << "Podaj slowo: ";
cin >> slowo;
for (int i = 0; i < slowo.length(); i++)
if (slowo[i] == 'e')
slowo[i] = 'i';
}
else if (slowo[i] == 'i')
slowo[i] = 'e';
cout << "Wynik: " << slowo << endl;
" 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 slowo;
cout << "Podaj slowo: ";
cin >> slowo;
for (int i = 0; i < slowo.length(); i++)
{
if (slowo[i] == 'e')
{
slowo[i] = 'i';
}
else if (slowo[i] == 'i')
{
slowo[i] = 'e';
}
}
cout << "Wynik: " << slowo << endl;
}