Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC110 Fundamentals of CSC L3P2 TimesTable2 More with Less (Code)

Similar presentations


Presentation on theme: "CSC110 Fundamentals of CSC L3P2 TimesTable2 More with Less (Code)"— Presentation transcript:

1 CSC110 Fundamentals of CSC L3P2 TimesTable2 More with Less (Code)
Using VBSA

2 TimesTable 1 vs. 2 FORM LOAD CODE TABLE 1 FORM LOAD CODE TABLE 2
num1.Visible = False times.Visible = False num2.Visible = False equals.Visible = False product.Visible = False rowNum.Visible = False row.Visible = False List1.Clear List1.Add PRODUCT times = X equals = = Clear and Add done in Times Table; rowNum is unnecessary.

3 TimesTable 1 vs. 2 (cont.) TIMES TABLE 1 CODE TIMES TABLE 2 CODE
num1 = 1 num2 = 1 FOR rowNum = 1 TO 81 product = num1 x num2 ‘Prepare the row to go into the table row = num1 & times row = row & num2 row = row & equals row = row & product List1.Add row num2 += 1 IF num2 = 10 THEN num1 += 1 ELSE ‘Keep going! END IF NEXT List1.Clear List1.Add PRODUCT FOR num1 = 1 TO high FOR num2 = 1 TO high product = num1 * num2 Clear and Add done in Form Load 1 Loop; 1 Decision Loop ends per our code (81) 2 Loops; 0 Decision Loop end per user (high)


Download ppt "CSC110 Fundamentals of CSC L3P2 TimesTable2 More with Less (Code)"

Similar presentations


Ads by Google