Question: Please help me with this C++ project. Thanks Using C++ with string fucntion and C-string (strlen, strcat, etc..) to write a program that will prompt

Please help me with this C++ project. Thanks

Using C++ with string fucntion and C-string (strlen, strcat, etc..) to write a program that will prompt a user to input their name (first and last).

Ex: Please enter your first and last name: John Doe Then, output the string.

- Next, prompt the user to input their nickname. Ex: Enter your nickname: Rowdy

- Then modify the name string to consist of the persons last name comma, nickname (in all caps, enclosed in double quotes) and first name.

- Then output the modified string.

Ex: Doe, ROWDY John

- Then Output first and last name alternating each character: John Doe Ex: JDoohen Tim Wheaterton Ex: TWihmeaterton

NOTE: This program should loop, prompting the user to decide whether or not he or she wishes to enter another name.

Ex: Do you wish to enter another name(y/n)?

- Here is my code so far:

int main(String[] args) {

Scanner input = new Scanner(System.in);

String name, nickname, first, last;

char choice;

do

{

System.out.println("Please enter your first and last name: ");

name = input.nextLine();

System.out.println("Your name is : " + name);

System.out.println("Please enter your nickname");

nickname = input.nextLine();

nickname = nickname.toUpperCase();

...

System.out.println("Do you wish to enter another name(y/n)?");

choice = input.next().toLowerCase().charAt(0);

input.nextLine();

} while (choice != 'n');

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!