Question
Challenge 2: string exercise: Backwards Create a method in C# that prompts the user for a sentence that has at least 6 words in it.
Challenge 2: string exercise: Backwards Create a method in C# that prompts the user for a sentence that has at least 6 words in it. Your code should do the following:
1. Display to the user the sentence they have entered
2. Reverse the words in the sentence
3. Display to the user the sentence in reverse. For example, if the sentence was Hello World the output would be dlroW olleH ? User Input: Prompt the user to enter in a sentence with at least 6 words Validate six or more words have been entered Console Output: Display the sentence the user entered Use a method to reverse the sentence and output the result
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started