Challenge: Strings
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 9
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 1.25
Challenge: Strings
Sveip for å vise menyen
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 9
single