Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: String Formatting | Håndtering av Datatyper
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C#-Grunnleggende

bookChallenge: String Formatting

Oppgave

Swipe to start coding

Your challenge is to practice declaring variables and formatting strings in C#.

  • Declare a string variable named name and assign Alice.
  • Declare an integer variable named age and assign 20.
  • Print a sentence that uses both variables, formatted like this: Hello, my name is Alice and I am 20 years old.
  • Use string formatting to combine the variables and text in the output.

Løsning

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 2. Kapittel 12
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

close

bookChallenge: String Formatting

Sveip for å vise menyen

Oppgave

Swipe to start coding

Your challenge is to practice declaring variables and formatting strings in C#.

  • Declare a string variable named name and assign Alice.
  • Declare an integer variable named age and assign 20.
  • Print a sentence that uses both variables, formatted like this: Hello, my name is Alice and I am 20 years old.
  • Use string formatting to combine the variables and text in the output.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 2. Kapittel 12
single

single

some-alt