Respuesta :
Answer:
// This program is written in C++
// Comments are used for explanatory purposes
// Program starts here
#include<iostream>
using namespace std;
int main()
{
// Declare Variable name
string name;
// Prompt user for input
cout<<"Enter your name: ";
cin>>name;
// Print name
cout<<"Hello, "<<name<<"!\n";
// Print length of name
cout<<"Your name is "<<name.length()<<" letters long\n";
// Print first character
cout<<"Your name starts with a "<<name.at(0)<<"\n";
// Print last character
cout<<"Your name end with a "<<name.at(name.length()-1)<<"\n";
cout<<"Goodbye!";
return 0;
}