Advertisement
YankoZlatanov

Untitled

Feb 10th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using System;
  2.  
  3. class RandomNumbersInGivenRange
  4. {
  5.     static void Main()
  6.     {
  7.         int counter = int.Parse(Console.ReadLine());
  8.         int minNum = int.Parse(Console.ReadLine());
  9.         int maxNum = int.Parse(Console.ReadLine());
  10.         Random rnd = new Random();
  11.         for (int i = 0; i < counter; i++)
  12.         {
  13.             int print = rnd.Next(minNum, maxNum + 1);
  14.             Console.Write(print + " ");
  15.         }
  16.         Console.WriteLine();
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement