Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace UppercaseLetters
- {
- class UppercaseLetters
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter some text here: ");
- string text = Console.ReadLine();
- string toUpperCase = "";
- int index1 = 0;
- int index2 = 0;
- index1 = text.IndexOf("<up>");
- index2 = text.IndexOf("</up>");
- toUpperCase = text.Substring(index1 + 4, index2 - (index1 + 4));
- text = text.Replace("<up>" + toUpperCase + "</up", toUpperCase.ToUpper());
- Console.WriteLine("The new text is: ");
- Console.WriteLine();
- Console.WriteLine(text);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement