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 Електронно_съобщение
- {
- class Program
- {
- static void Main(string[] args)
- {
- string a = Console.ReadLine();
- char[] b = a.ToLower().ToCharArray();
- int count = 0;
- int countMax = 0;
- for (int i = 0; i < b.Length; i++)
- {
- char z = b[i];
- if (
- z == 'a' || z == 'b' || z == 'c' || z == 'd' || z == 'e' || z == 'f' || z == 'g' || z == 'h' || z == 'i'
- || z == 'j' || z == 'k' || z == 'l' || z == 'm' || z == 'n' || z == 'o' || z == 'p' || z == 'r' || z == 'q' ||
- z == 's' || z == 't' || z == 'u' || z == 'v' || z == 'w' || z == 'x' || z == 'y' || z == 'Z' || z == '0'
- || z == '1' || z == '2' || z == '3' || z == '4' || z == '5' || z == '6' || z == '7' || z == '8' || z == '9' || z == '.' || z == ' ' ||
- z == null)
- {
- count = 0;
- }
- if (
- z != 'a' && z != 'b' && z != 'c' && z != 'd' && z != 'e' && z != 'f' && z != 'g' && z != 'h' && z != 'i'
- && z != 'j' && z != 'k' && z != 'l' && z != 'm' && z != 'n' && z != 'o' && z != 'p' && z != 'r' && z != 'q' &&
- z != 's' && z != 't' && z != 'u' && z != 'v' && z != 'w' && z != 'x' && z != 'y' && z != 'Z' && z != '0'
- && z != '1' && z != '2' && z != '3' && z != '4' && z != '5' && z != '6' && z != '7' && z != '8' && z != '9' && z != '.' && z != ' ')
- {
- count++;
- }
- if (countMax <= count)
- {
- countMax = count;
- }
- }
- Console.WriteLine(countMax);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement