Hello, I'm new to this forum and have a brief knowledge of C++. I made this program to ask the user for a word and make it so the word would not be allowed any "i's". I completed the task just my code looks a bit to much I think. Can you suggest ways i shorten it. Thank you.
// Code Shark
#include <iostream>
using namespace std;
int main() {
char word[20];
int i = 0;
cout << "Enter a word which includes NO i's : ";
cin >> word;
do {
word[i];
if(word[i] == 'i') {
i++;
cout << endl << "I asked for no i's!";
cin.get();
cin.get();
}
}
while(i);
return 0;
cin.get();
cin.get();
}