/
Ajzat
/
ControlWork1
Обзор
Документация
Войти
/
Ajzat
/
ControlWork1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
ConsoleApp9/Program.cs
53 строки
2 KB
ajzatsabirov
Домашка Тесты
15 ноя 2025, 23:28
15 ноя 2025, 23:28
1f8ec50
Код
Авторство
О чём код?
namespace ConsoleApp9; public class Program { static void Main(string[] args) { string str = null; System.Console.WriteLine(Number3.SecondQuestion(str)); } public static int FirstQuestion(int[] nums2){ int a = int.MaxValue; for (int i = 0; i < nums2.Length; i++){ if (nums2[i] < a){ a = nums2[i]; } } return a; } public static char ThirdQuestion(string str){ return str[str.Length - 3]; } public static int SecondQuestion(string str){ int k = 0; for (int i = 0; i < str.Length; i++){ if (Char.IsLower(str[i])){ k += 1; } } return k; } public static bool IsPalindrome(int str){ string a = str.ToString(); for (int i = 0; i < (a.Length/2); i++){ if (a[i] != a[a.Length - 1 - i]){ return false; } } return true; } public static int FifthQuestion(int[] nums, int a){ int[] result = new int[nums.Length]; int m = 0; for (int i = 0; i < nums.Length; i++){ m += nums[i]; result[i] = m - nums[i]; } return result[a]; } }