Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Misc {
- class Program {
- static void Main (string[] args) {
- string str = Console.ReadLine();
- string newStr = null;
- foreach (char ch in str) {
- bool isUpCaseLetter = ch >= 'A' && ch <= 'E';
- bool isLowCaseLetter = ch >= 'a' && ch <= 'e';
- bool isDigit = char.IsDigit (ch);
- if (isUpCaseLetter || isLowCaseLetter || isDigit)
- newStr += ch;
- }
- Console.WriteLine (newStr);
- Console.ReadLine ();
- }
- }
- }
Add Comment
Please, Sign In to add comment