Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old May 19th, 2003, 04:10 AM
dunthon dunthon is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: holland
Posts: 2 dunthon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 11 sec
Reputation Power: 0
randomize or generate?

i am making a math program. but can i make a label what automatically randomized or generated math questions??
or do i need to make a Array?

how can i do it? can you tell me the codes i can juse best?

Reply With Quote
  #2  
Old May 22nd, 2003, 07:32 PM
SpacePirate SpacePirate is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 8 SpacePirate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I believe it is rnd * the number you wish to be the maximum. If you store it to an integer, it will get rid of the decimal.

rnd returns a value from .00001 to .99999.

To use it as an integer, use this format:
num = rnd*6+1
That will make a random integer from 1 to 6, assuming num is an integer.

If you do not add one, rnd*6 will be an integer from 0 to 5.

Reply With Quote
  #3  
Old October 1st, 2003, 02:35 AM
arafu_ak arafu_ak is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: oman
Posts: 2 arafu_ak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
it generate only long values. if we convert to integer same numbers repeates manytimes.any possibility to generate random integer value which is not repeats

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > randomize or generate?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway