This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Задача 47. | |
| Задайте двумерный массив размером m×n, заполненный случайными вещественными числами. | |
| m = 3, n = 4. | |
| 0,5 7 -2 -0,2 | |
| 1 -3,3 8 -9,9 | |
| 8 7,8 -7,1 9 | |
| */ | |
| int rows = ReadInt("Введите количество строк: "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Console.Write("Введите числа через запятую: "); | |
| int[] numbers = StringToNum(Console.ReadLine()); | |
| PrintArray(numbers); | |
| int sum = 0; | |
| for (int i = 0; i < numbers.Length; i++) | |
| { | |
| if (numbers[i] > 0) | |
| { | |
| sum++; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Задача 19 | |
| Напишите программу, которая принимает на вход пятизначное число и проверяет, является ли оно палиндромом. | |
| 14212 -> нет | |
| 12821 -> да | |
| 23432 -> да | |
| */ | |
| Console.WriteLine("Введите число: "); | |
| string number = Console.ReadLine(); |