using System;
class Program
{
static void Main()
{
Console.Write("Введите слово: ");
string word = Console.ReadLine().ToLower();
int count = 0;
for (int i = 0; i < word.Length - 1; i++)
{
if (word[i] == 'а' && word[i + 1] == 'б')
{
count++;
}
}
Console.WriteLine("Количество вхождений «аб»: " + count);
}
}using System;
class Program
{
static void Main()
{
Console.Write("Введите текст: ");
string text = Console.ReadLine();
bool insideQuotes = false;
string result = "";
foreach (char c in text)
{
if (c == '«')
{
insideQuotes = true;
}
else if (c == '»')
{
insideQuotes = false;
}
else if (!insideQuotes)
{
result += c;
}
}
Console.WriteLine("Результат:");
Console.WriteLine(result);
}
}using System;
class Program
{
static void Main()
{
string a = Console.ReadLine();
string b = Console.ReadLine();
string c = Console.ReadLine();
foreach (string word in a.Split(' '))
if (b.Contains(word) && c.Contains(word))
{
Console.WriteLine(word);
break;
}
}
}