Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Strings | Hantera Datatyper
C#-Grunder

bookChallenge: Strings

Uppgift

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 allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 9
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

bookChallenge: Strings

Svep för att visa menyn

Uppgift

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 desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 9
single

single

some-alt