473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how do I up date this program with control statements for random numbers 4 digits and

Expand|Select|Wrap|Line Numbers
  1. Dim iRand As Integer
  2.       Dim iRand1 As Integer
  3.       Dim iRand2 As Integer
  4.       iRand = oRand.Next(1, 10)
  5.       iRand1 = oRand.Next(1, 10)
  6.       iRand2 = oRand.Next(1, 10)
  7.       TextBox1.Text = iRand & " " & iRand1 & " " & iRand2


No arrays please
Mar 2 '09 #1
2 1139
QVeen72
1,445 Expert 1GB
Hi,

Why use 3 seperate digits...? Just Change the Limits of Random Class
try this :
Expand|Select|Wrap|Line Numbers
  1. TextBox1.Text = oRand.Next(1000, 9999)
  2.  
Regards
Veena
Mar 3 '09 #2
QVeen72
1,445 Expert 1GB
Hi,

Why use 3 seperate digits...? Just Change the Limits of Random Class
try this :
Expand|Select|Wrap|Line Numbers
  1. TextBox1.Text = oRand.Next(1000, 9999)
  2.  
Regards
Veena
Mar 3 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Aubrey Hutchison | last post by:
### this will test if your version of IDLE on windows is a MATURE program design ### print "Hello world, If Python IDLE is a mature program design it will output this" Save this simple...
4
by: tao_benz | last post by:
Hi: My system generates a bunch of integers, about 1000. There is no any relationship between those integers; the smallest one might only contain 1 digit and the biggest one might contain 6...
10
by: Marshall Belew | last post by:
I'm trying to synchronize a network app that uses random numbers generated by System.Random. Rather than pass every randomly generated number, I just pass the seed. I'm seeing a result that leads...
104
by: fieldfallow | last post by:
Hello all, Is there a function in the standard C library which returns a prime number which is also pseudo-random? Assuming there isn't, as it appears from the docs that I have, is there a...
11
by: TreatmentPlant | last post by:
I need to generate a few thousand true random numbers using C++. I have some code now that does alright, but when you plot the results on a graph, you notice patterns, so the numbers are not...
7
by: rcamarda | last post by:
I wish to build a table based on values from another table. I need to populate a table between two dates from another table. Using the START_DT and END_DT, create records between those dates. I...
3
by: stjulian | last post by:
I have used set typ = server.createobject("Scriptlet.TypeLib") to create a random string of 36 characters. However, is there a way to create a random string of digits in the length I request?...
22
by: gagan.singh.arora | last post by:
Hi there. I want to generate random numbers with a given probability, say 80% even and 20% odd. Is it possible to implement such an algorithm in C?
41
by: Zytan | last post by:
Anyone do any tests on it? I would assume it has improved since C's rand(), but who knows. For some reason, and it could just be coincidence, I seem to see patterns. But even a crappy rand()...
16
by: sotirac | last post by:
Wondering if there is a better way to generate string of numbers with a length of 5 which also can have a 0 in the front of the number. <pre> random_number = random.sample(, 5) # choose 5...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.