Assume that given, middle and family are three variables of type string that have been assigned values. Write an expression whose value is a string consisting of the first character of given followed by a period followed by the first character of middle followed by a period followed by the first character of family followed by a period: in other words, the initials of the name. So if the values of these three variables were "John" "Fitzgerald" "Kennedy", then the expression's value would be "J.F.K.".
.
.
Click on the title for the solution
.
.
.
Click on the title for the solution
.
.
This is the answer:
:
given.substr(0,1)+"."
+middle.substr(0,1)+
"."+family.substr(0,1)+
"."
Comments
Post a Comment