Challenge: Concatenating Strings

Solve the challenge to check your understanding of concatenating strings.

We'll cover the following

Requirements

Write a pseudocode example in which the user’s first and last name is provided. The code outputs a greeting message that includes their first name. For example, if the user’s first name is “John” and their last name is “Doe,” the output should be "Hello, John Doe!" and "How are you doing Doe?".

Your pseudocode should perform the following steps:

  1. Ask the user to enter their first and last name and store them in separate variables called firstName and lastName.
  2. Concatenate the firstName and lastName variables with the greeting message "Hello, " and an exclamation point. Store the result in a variable called greeting.
  3. Concatenate the lastName variable with the message "How are you doing" and a question mark. Store the result in a variable called inquiring_health.
  4. Print the greeting and inquiring_health variables to the console.

You can use the space provided below to write your pseudocode.

Get hands-on with 1400+ tech skills courses.