Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace rnd
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a, b;
- int[] arr;
- Console.Write("Введите первое число ->");
- a = Convert.ToInt32(Console.ReadLine());
- Console.Write("Введите второе число ->");
- b = Convert.ToInt32(Console.ReadLine());
- ArrayFill(a, b, out arr);
- foreach(int i in arr)
- {
- Console.WriteLine(i);
- }
- Console.ReadLine();
- }
- static void ArrayFill (int a, int b, out int []arr)
- {
- Random rand = new Random();
- arr = new int[10];
- for (int i = 0; i < arr.Length; i++)
- arr[i] = rand.Next(a, arr.Length);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement