#include <iostream>
using namespace std;
signed main() {
string word;
char letter;
cout << "Write a word: ";
cin >> word;
cout << "\n" << "Write a letter: ";
cin >> letter;
cout << "\n" << "Your word without your letter: ";
for(auto i: word)
if(i != letter)
cout << i;
}
всегда ставь точку запятую
Объяснение:
#include <iostream>
using namespace std;
signed main() {
string word;
char letter;
cout << "Write a word: ";
cin >> word;
cout << "\n" << "Write a letter: ";
cin >> letter;
cout << "\n" << "Your word without your letter: ";
for(auto i: word)
if(i != letter)
cout << i;
}
#include <iostream>
using namespace std;
signed main() {
string word;
char letter;
cout << "Write a word: ";
cin >> word;
cout << "\n" << "Write a letter: ";
cin >> letter;
cout << "\n" << "Your word without your letter: ";
for(auto i: word)
if(i != letter)
cout << i;
всегда ставь точку запятую
Объяснение: