Created
August 24, 2024 11:16
-
-
Save IvanEnginer/ada4a9dad71b2d7b33555ed019dcec14 to your computer and use it in GitHub Desktop.
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
using System; | |
namespace HW_02 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int randomSizeArray = new Random().Next(1, 101); | |
Random randomNumber = new Random(); | |
int[] array = new int[randomSizeArray]; | |
Console.WriteLine($"Размер массива {randomSizeArray}\nСлучайные числа в массиве:"); | |
for (int i = 0; i < array.Length; i++) | |
{ | |
array[i] = randomNumber.Next(10, 21); | |
} | |
foreach (int i in array) | |
{ | |
Console.WriteLine(i); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment