aleahim

GenerateRandomNumbers

Jan 31st, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using System;
  2.  
  3. class GenerateRandomNumbers
  4. {
  5.     static void Main()
  6.     {
  7.         Random n = new Random();
  8.         int number = n.Next(100, 200); //n.Next() finds the next random # bet 100 and 200
  9.  
  10.         for (int i = 1; i <= 10; i++) //the program will run through 10 iterations
  11.             Console.WriteLine(n.Next(100, 200)); //program prints the next random #
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment