Is there any other method to change the first letter and last letter of a 6 letter word?
#include <iostream>
#include <string>
using namespace std;
int main()
{
string word;
cout<< "\nEnter a 6 letter word or numbers: ";
cin>>word;
word[0]++;
word[5]++;
cout << "Result: " << word << endl;
return 0;
}