Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


DISPLAYING NUMBERS USING VBSCRIPT WHILE LOOP?

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,2852
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> DISPLAYING NUMBERS USING VBSCRIPT WHILE LOOP?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 DISPLAYING NUMBERS USING VBSCRIPT WHILE LOOP? - 5/1/2005 6:19:46 PM   
  seeker1234

 

Posts: 1
Score: 0
Joined: 5/1/2005
From:
Status: offline
CAN SOMEBODY SHOWM HOW TO DISPLAY A NUMBER USING A VBSCRIPT WHILE LOOP. THE NUMBERS ARE CALCULATED BY STARTING WITH A O AND 1 AND EACH ADDITIONAL NUMBER IS THE SUM OF THE PREVIOUS 2 VALUES. THE RESULTS MUST BE CALCULATED USING VBSCRIPT WHILE LOOP.

DISPLAY OF THE NUMBERS SHOULD BASICALLY LOOK LIKE THIS
0,1,1,2,3,5,8,13,21,34,55,89
THE LOOP SIMPLY STARTS FROM 0 UP TO 12
 
 
Post #: 1
 
 Re: DISPLAYING NUMBERS USING VBSCRIPT WHILE LOOP? - 5/2/2005 1:37:00 AM   
  VBS

 

Posts: 110
Score: 0
Joined: 3/2/2005
From: Lebanon
Status: offline
Dear seeker1234,
The code will do exactly what u want.
If u want the code to run in an HTML file then use the first one, but if u want it to run in an ASP without viewing the code for the users then use the next one:

1. In HTML

      


2. In ASP


      

Please not if u wanna make the loop go further than twelve, simple change the number 12 to the number u want in the following line of codes:

      

Hope this helps


Best Regards

Firas S Assaad

(in reply to seeker1234)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> DISPLAYING NUMBERS USING VBSCRIPT WHILE LOOP? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts