Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication33
- {
- class Program
- {
- static void Main(string[] args)
- {
- StringTool objString = new StringTool();
- Console.WriteLine("Введите строку ");
- objString.processedString = Console.ReadLine();
- Console.WriteLine(objString.LettersClean(Console.ReadLine()));
- }
- }
- class StringTool
- {
- public string processedString;
- public string LettersClean(string somestring)
- {
- string resultString = null;
- foreach (char a in somestring)
- if (!char.IsLetter(a))
- resultString += a;
- return resultString;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement