Question
Answered step-by-step

2.12LAB: Name format Many documents use a specific format for a...

2.12 LAB: Name format

Many documents use a specific format for a person's name. Write program whose input is:

firstName middleName lastName

and whose output is:

lastName, firstInitial.middleInitial.

Ex: If the input is:

Pat Silly Doe

the output is:

Doe, P.S.

If the input has the form:

firstName lastName

the output is:

lastName, firstInitial.

Ex: If the input is:

Julia Clark

the output is:

Clark, J.

Answer & Explanation
Verified Solved by verified expert
Rated Helpful

lestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dol

et, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellent

sus ante, dapibus a molestie consequat, ultrices

m ipsum dolor sit amet, consectetur adipiscing eli

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer
Step-by-step explanation

ec alique

lestie consequat, ul

facilisis. Pellentesque dapibus efficitur


pulvinar tortor nec facilisis. Pellentesque dapibus effi

cing elit. Nam lacinia pulvinar tortor nec faci

cing elit. Nam lacinia pulvinar tortor ne

fficitur laoreet. Nam risus


e vel laoreet ac, di

sum dolor sit amet, consectetur adipiscing


itur laoreet. Nam risus ante, dapibus a

usce dui lectus, congue vel

usce dui lectus, congue vel laoree

e vel laoreet ac, d

sus ante, dapibus a molestie consequat, ultric

Fusc

acinia pulvinar tortor nec facilisis. Pellentesqu

, dictum vitae odio. Donec aliquet

ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet


m ipsum

ac, dictum vitae odio. D

onec aliquet. Lorem ipsum dol

sus ante, dapibus a moles

gue vel laore



m ipsum

s ante, dapibus a molestie

ec facilisis. Pellentesque

ia pulvinar tortor nec faci

congue vel