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

single

bookChallenge: Greeting Generator

Stryg for at vise menuen

Opgave

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.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

some-alt