Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Strings | Dealing with Data Types
C# Basics

bookChallenge: Strings

Task

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

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 7
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

bookChallenge: Strings

Swipe to show menu

Task

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

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Β 2. ChapterΒ 7
single

single

some-alt