Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub math()
- Dim rows As Long
- rows = 0
- For i = 1 To 250 'i represents a
- Cells(2, 6).Value = i / 250 'tells me what % of the process we've completed
- For j = 1 To 250 'j represents b
- For k = 1 To 250 'k represents c
- ''if the sqrt of a squared, b squared , and c squared is an integer
- If Sqr(i ^ 2 + j ^ 2 + k ^ 2) / 1 = Sqr(i ^ 2 + j ^ 2 + k ^ 2) \ 1 Then
- rows = rows + 1
- ''tell me what that value is, as well as a, b, anc c
- Cells(rows, 1).Value = Sqr(i ^ 2 + j ^ 2 + k ^ 2)
- Cells(rows, 2).Value = i
- Cells(rows, 3).Value = j
- Cells(rows, 4).Value = k
- End If
- Next k
- Next j
- Next i
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement