Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2005, 2:01 PM   #1
edspeth
Newbie
 
Join Date: Mar 2005
Posts: 3
Rep Power: 0 edspeth is on a distinguished road
Loops!

Sorry guys, begginer here, im trying to output a list of timestables
eg
1 x 6 = 6
2 x 6 = 12
3 x ...

but im really struggling with outputting the 'x 6 =' i.e the loop for the numbers is obviously easy but im not sure how to attach the fixed text each time. Any ideas?
edspeth is offline   Reply With Quote
Old Mar 30th, 2005, 4:37 PM   #2
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
your going to need two different for loops. one for the first number and one for the second number.

so something like this:
  for x=0 to 12 step 1
 	   for y=0 to 12 step 1
 			   answer = x * y 
 		    lblMyLabel.Caption = lblMyLabel.Caption & vbCrLf & x & "x" & y & "=" & answer
 	  Next y
  Next x
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!

Last edited by Pizentios; Mar 30th, 2005 at 4:52 PM.
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:47 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC