Quiz+4-14

Quiz 4-14:

Declare a one dimensional array of an string data type that has 5000 Rows. Then fill each cell that is divisible by 13 with "Lucky" Note: the other cells will have "UnLucky" in them. Good Luck!

'========================== This is a way using MOD Dim Frog(5000) as string Dim I as integer

For I = 1 to 5000 If I mod 13 = 0 then Frog(I) = "Lucky" Else Frog(I) = "UnLucky" end If Next I

'========================== This is a way using two loops Dim Frog(5000) as string

Dim I as integer

For I = 1 to 5000 <span style="color: #0000ff; font-family: 'Comic Sans MS',cursive;">Frog(I) = "UnLucky" <span style="color: #0000ff; font-family: 'Comic Sans MS',cursive;">Next I

<span style="color: #0000ff; font-family: 'Comic Sans MS',cursive;">For I = 13 to 5000 step 13 <span style="color: #0000ff; font-family: 'Comic Sans MS',cursive;">Frog(I) = "Lucky" <span style="color: #0000ff; font-family: 'Comic Sans MS',cursive;">Next I