logo CodeStepByStep logo

nameGame

Language/Type: C++ string interactive programs
Related Links:

Write a console program with a main function that prints the following rhyme about the person's first and last name. You may assume that the user types a string with exactly one space.

What is your name? Fifty Cent
Fifty, Fifty, bo-Bifty
Banana-fana fo-Fifty
Fee-fi-mo-Mifty
FIFTY!

Cent, Cent, bo-Bent
Banana-fana fo-Fent
Fee-fi-mo-Ment
CENT! 
Function: Write a C++ function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.