//Write a program that reads in a character. Display the character. If the character // entered is from 'a' to 'f' display "beginning" and and write out the next letter // if from 'w' to 'z' display "end" and write out the previous letter. If // the character is not a lower case letter display a message. #include using namespace std; int main() { char ch; cout << "Please enter a character"<< endl; cin >> ch; cout << " character: " << ch << endl; if ((ch >= 'a') && (ch <= 'f')) //check from 'a' to 'f' { cout << "beginning " << endl; cout << " the next character: " << char(ch + 1) << endl; } else if ((ch >= 'w') && (ch <= 'z')) // check from 'w' to 'z' { cout << "end " << endl; cout << " the previous character: " << char(ch - 1) << endl; } if (!((ch >= 'a') && (ch <= 'z'))) // check from 'a' to 'z' cout << ch << " is not a lower case letter " << endl; }