Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Reverse Words in a Sentence | Advanced Looping: Patterns, Nesting, and Pitfalls
Quizzes & Challenges
Quizzes
Challenges
/
C# Loops Practice

bookChallenge: Reverse Words in a Sentence

Tâche

Swipe to start coding

Write a function that reverses the order of words in a given sentence using a loop.

  • The function must split the input sentence into words.
  • The function must use a loop to reconstruct the sentence with the words in reverse order.
  • The function must return the reversed sentence as a single string.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 4
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

Awesome!

Completion rate improved to 5.56

bookChallenge: Reverse Words in a Sentence

Glissez pour afficher le menu

Tâche

Swipe to start coding

Write a function that reverses the order of words in a given sentence using a loop.

  • The function must split the input sentence into words.
  • The function must use a loop to reconstruct the sentence with the words in reverse order.
  • The function must return the reversed sentence as a single string.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 4
single

single

some-alt