Login
Sign Up
Home
Program
Project
My Zone
Support
Show Code
Browse Program
Search Program
Online random number generator
Input Variables
Output Variables
Program Code
Description
Variable Name *
(dynamic type)
*
!
UP
Down
Delete
Default Value *
*
Description *
*
Multi Lines
Variable Name *
(dynamic type)
*
!
UP
Down
Delete
Default Value *
*
Description *
*
Multi Lines
Variable Name *
(dynamic type)
*
!
UP
Down
Delete
Default Value *
*
Description *
*
Multi Lines
Variable Name *
(dynamic type)
*
UP
Down
Delete
Description *
*
Input Variables List
Output Variables List
Source Code
int[] allnum = new int[n]; Random rand = new Random(); StringBuilder s = new StringBuilder(); for (int i = 0; i < allnum.Length; i++) { allnum[i] = rand.Next(low, high); for (int k = 0; k < allnum.Length; k++) { while (true) { if (allnum[k] == allnum[i] && k != i) { allnum[i] = rand.Next(low, high); k = 0; } else { break; } } } s.AppendLine( allnum[i].ToString()); } result=s;
Subject
Description
A random number is a number chosen as if by chance from some specified distribution such that selection of a large set of these numbers reproduces the underlying distribution.
The program can online generate a single set of random numbers without duplicate numbers from a range [low, high] for lotteries, prize draws, gaming, divination, research
Category
Mathematics
Created By
tech
Created Date
4/17/2011
Last Modify Date
4/17/2011
Calculation Count
508
Version
1.00
Positive
0
Neutral
0
Negative
0
Related Program ID
None
Copyright ©2009-2010 CUI WEI. All Rights Reserved.