#include #include // Terminal users don't need this line, // but VS users might need it to compile. using namespace std; // This assignment is worth 4 points. string str0; int main() { cout << "Enter a word: "; cin >> str0; cout << str0.substr(1, str0.length()-2) << endl; /* * The first number is 1 because we want to start at the * second letter to effectively erase the first. The second * number is length() - 2 because the substring length * should always be 2 characters less than the whole length * since we're taking off exactly two characters from the * string: the first and the last. */ return 0; }