Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Strings | Håndtering af Datatyper
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Grundlæggende

bookChallenge: Strings

Opgave

Swipe to start coding

Your task is to practice working with string variables in C#.

  • Declare a string variable to store the title of a book. (The Great Gatsby)
  • Declare a string variable to store the author's name. (F. Scott Fitzgerald)
  • Assign a value of your choice to each variable ("The Great Gatsby" and "F. Scott Fitzgerald").
  • Print the book title to the console.
  • Print the author's name to the console.
  • Make sure both values are printed, each on its own line.

Example output:

The Great Gatsby
F. Scott Fitzgerald

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 9
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

close

bookChallenge: Strings

Stryg for at vise menuen

Opgave

Swipe to start coding

Your task is to practice working with string variables in C#.

  • Declare a string variable to store the title of a book. (The Great Gatsby)
  • Declare a string variable to store the author's name. (F. Scott Fitzgerald)
  • Assign a value of your choice to each variable ("The Great Gatsby" and "F. Scott Fitzgerald").
  • Print the book title to the console.
  • Print the author's name to the console.
  • Make sure both values are printed, each on its own line.

Example output:

The Great Gatsby
F. Scott Fitzgerald

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 2. Kapitel 9
single

single

some-alt