Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Code-golf is a competition to solve a particular problem in the fewest bytes of source code.
0
votes
Print number triangle
VBA, 116 bytes
Function n(m As Integer)
If m > 0 Then
For a = 1 To m
n = n & " " & a
Next
Debug.Print n(m - 1)
End If
End Function
0
votes
Out-of-Control Rounding Errors
VBA, 347 bytes
Function OoCRE(inp As String)
ct = 0
i = 1
Do While i < Len(inp)
c = Mid(inp, i, 1)
If Not IsNumeric(c) Then
ct = ct + 1
If ct = 2 Then
inp = Round(Application.Evaluate(Left(inp, i - 1 …
4
votes
Check whether letters of word are in alphabetical order
VBA (161 bytes)
Function t(s As String)
t = 0
For i = 2 To Len(s)
a = Left(LCase(s), i)
If Asc(Right(a, 1)) <= Asc(Right(a, 2)) Then Exit Function
Next
t = 1
End Function
Compares ascii value …
5
votes
The Real Slim Shady
VBA 343 bytes
Sub EMINEM()
e = "Slim "
m = "Shady"
i = "I'm "
n = "lease stand up"
em = "real "
MsgBox i & e & m & ". Yes, " & i & "the " & em & m & "." & Chr(10) & "All you other " & e & m & "s are …
1
vote
When was the last time the date was divisible by n?
VBA 343 bytes (module)
Sub divD(i As Long)
a = Now()
b = Format(a, "yyyymmdd")
Do While b / i <> Int(b / i)
a = DateAdd("d", -1, a)
b = Format(a, "yyyymmdd")
If b = "01000101" The …
0
votes
Determine if all decimal digits are unique
VBA (145)
Function jkl(f As String) As Boolean
For i = 1 To Len(f)
jkl = InStr(1, f, Left(Mid(f, i), 1)) <> i
If jkl = True Then Exit Function
Next
End Function
Calling the function and output wi …