Strings1

Console.WriteLine("Give me a string..."); string str; str = Console.ReadLine(); // display the variable Console.WriteLine("The string is: " + str); // capitalize it, and display it Console.WriteLine("Capitalized: " + str.ToUpper()) // convert it to lower case, and display it Console.WriteLine("Lower Case: " + str.ToLower()) // trim any empty spaces, and display it Console.WriteLine("No spaces: " + str.Replace(" ", ""))

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.