Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string cont = "yes";
- string input;
- while(!(cont == "exit")){
- Console.WriteLine("Enter a sentence: ");
- input = Console.ReadLine();
- string[ ] words = input.Split(' ');
- Array.Reverse(words);
- foreach(string word in words){
- Console.Write(word+" ");
- }
- Console.WriteLine("\nIf you would like to quit, enter exit: ");
- cont = Console.ReadLine();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement