Hello! I am very new to programming and I can not figure out how to do this code. It has been a struggle the past weekend trying to figure it out. The program is:

"A loop that keeps reading words until it runs out of input, and prints the words that are alphabetically first and last. You can assume that the words are actual words and all in lowercase."
This is what I have so far:

int main ()
{
string current;
cout << "Enter a word" << ".\n"

while(cin>>current)

{
}
}

I am completely stuck, so any help would be greatly appreciated.