how to get the answer...anyone can help

Write a program that asks for a user first name and last name separately.
The program must then store the users full name inside a single string and out put it to the string.
i.e.
Input:
John
Smith
Output:
John Smith

★ Modify the program so that it then replaces every a, e, i , o, u w/ the letter z.
i.e.
John Smith -> Jzhn Smzth

★★ Modify the Program so that it reverses the users name
i.e.
John Smith -> htimS nhoJ
I would start by asking the user for their first name.
Then ask them for their second name.
Then combine both names in a single string.
Then output that string.

=P
Last edited on
full program plz
No. This isn't a homework service.
std::string::operator+ might be of some use.

a_string = string_a + string_b + "."; //Legal and intuitive if you're using std::strings!

-Albatross
Last edited on
ok... but i just want to know the answer
What will you gain if we just tell you the answer? Most likely, nothing. I don't mean this as an insult to your learning capabilities, but rather as a reference to a bit of common knowledge among wise tutors that giving solutions rarely helps the student learn.

I wrote more about this topic here: http://cplusplus.com/articles/DjGEy60M/

-Albatross
thank you...
This probably isnt' his homework, considering he copied it word-for-word from the Beginner Exercises thread at:

http://www.cplusplus.com/forum/articles/12974/
That makes my point even more relevant, as the OP wouldn't even get a good grade for the assignment. :)

-Albatross
This probably isnt' his homework, considering he copied it word-for-word from the Beginner Exercises thread at:

http://www.cplusplus.com/forum/articles/12974/


Maybe some CS teachers are starting to steal questions from this site the way their students are stealing the answers???
I guess maybe I'm too cynical. I just assume the worst =P
Topic archived. No new replies allowed.