Write a fragment of code that reads a line of text (using getline) from standard input consisting of a last name followed by a first name (separated by exactly one blank), and prints out the first initial followed by a period then a blank then the full last name. Declare any necessary variables. (string processing)

LANGUAGE: C++

CHALLENGE:

Write a fragment of code that reads a line of text (using getline) from standard input consisting of a last name followed by a first name (separated by exactly one blank), and prints out the first initial followed by a period then a blank then the full last name. Declare any necessary variables. (string processing)

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,