Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Greeting Generator | Fundamentals of Strings
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Strings and Text Processing
close
SectionΒ 1. ChapterΒ 2
single

single

bookChallenge: Greeting Generator

Swipe to show menu

Task

Swipe to start coding

Write all your code directly inside the Main method.

  • Declare a string variable with the value Alice.
  • Generate a personalized greeting message by concatenating strings using the + operator, and print it.
  • Generate the same greeting message using string interpolation with the $"..." syntax, and print it.
  • Both messages must be printed on separate lines and must be exactly Hello, Alice! Welcome to the program.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 2
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt