Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Switch | Kontrollstrukturen
C# Grundlagen

bookChallenge: Switch

Aufgabe

Swipe to start coding

Your task is to complete the PrintPlanDescription method so that it uses a switch statement to print the correct plan or day description based on the numeric code provided by the user.

  • If the code is 1, print "Basic Plan".
  • If the code is 2, print "Standard Plan".
  • If the code is 3, print "Premium Plan".
  • If the code is 4, print "Weekend".
  • If the code is 5, print "Holiday".
  • For any other code, print "Invalid code".

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 17
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Switch

Swipe um das Menü anzuzeigen

Aufgabe

Swipe to start coding

Your task is to complete the PrintPlanDescription method so that it uses a switch statement to print the correct plan or day description based on the numeric code provided by the user.

  • If the code is 1, print "Basic Plan".
  • If the code is 2, print "Standard Plan".
  • If the code is 3, print "Premium Plan".
  • If the code is 4, print "Weekend".
  • If the code is 5, print "Holiday".
  • For any other code, print "Invalid code".

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 17
single

single

some-alt