Express a given date in 2015 in the MM/DD/YY format.
Determine the total number of distinct values of MM*DD in the year 2015.
DefDbl A-Z
Dim v(372), crlf$
Function mform$(x, t$)
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
mform$ = a$
End Function
Private Sub Form_Load()
ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents
For m = 1 To 12
For d = 1 To 31
v(m * d) = 1
Next
Next
For i = 1 To 372
If v(i) Then ct = ct + 1
Next
Text1.Text = Text1.Text & ct
Text1.Text = Text1.Text & " done"
End Sub
finds 184
|
Posted by Charlie
on 2015-02-15 14:18:04 |