using System;
namespace restless
{
class Program
static void Main(string[] args)
string text = Console.ReadLine();
int i = 0, _counterL = 0, _counterU = 0;
if (text[text.Length - 1] == '.')
do
if (text[i] >= 'A' && text[i] <= 'Z')
_counterU++;
else if (text[i] >= 'a' && text[i] <= 'z')
_counterL++;
i++;
} while (text[i] != '.');
if (_counterL > _counterU)
Console.WriteLine("Строчных английских букв больше");
else if (_counterU > _counterL)
Console.WriteLine("Прописных английских букв больше");
else if (_counterL == 0 && _counterU == 0)
Console.WriteLine("В тексте нет английских букв!");
else
Console.WriteLine("Равное количество английских букв");
}
Console.WriteLine("Сообщение должно заканчиваться точкой!");
Console.ReadKey();
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
using System;
namespace restless
{
class Program
{
static void Main(string[] args)
{
string text = Console.ReadLine();
int i = 0, _counterL = 0, _counterU = 0;
if (text[text.Length - 1] == '.')
{
do
{
if (text[i] >= 'A' && text[i] <= 'Z')
_counterU++;
else if (text[i] >= 'a' && text[i] <= 'z')
_counterL++;
i++;
} while (text[i] != '.');
if (_counterL > _counterU)
Console.WriteLine("Строчных английских букв больше");
else if (_counterU > _counterL)
Console.WriteLine("Прописных английских букв больше");
else if (_counterL == 0 && _counterU == 0)
Console.WriteLine("В тексте нет английских букв!");
else
Console.WriteLine("Равное количество английских букв");
}
else
Console.WriteLine("Сообщение должно заканчиваться точкой!");
Console.ReadKey();
}
}
}