Advertisement
CR7CR7

Class Random

Jan 21st, 2013
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace task2
  7. {
  8.     class Program
  9.     {
  10.         class RandomNumbersbetween100and200
  11.         {
  12.             static void Main(string[] args)
  13.             {
  14.                 Random rand = new Random();
  15.                 for (int number = 1; number <= 10; number++)
  16.                 {
  17.                     int randomNumber = rand.Next(200) + 1;
  18.                     Console.Write("{0} ", randomNumber);
  19.                 }
  20.             }
  21.         }
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement