Dim i As Integer Dim s As Integer Dim d As Integer ' // c2fbefeeebede8eb3a20caf3eff0e8ffedeee220c42ec52e2028632920442d6d6f6e3535 For i = 1000 To 9999 s = CInt((CInt(Mid(CStr(i), 1, 1))) ^ 2 + (CInt(Mid(CStr(i), 2, 1))) ^ 2 + (CInt(Mid(CStr(i), 3, 1))) ^ 2 + (CInt(Mid(CStr(i), 4, 1))) ^ 2) If s Mod 2 = 0 Or s Mod 3 = 0 Then d += 1 Next MsgBox(d)
Dim i As Integer
Dim s As Integer
Dim d As Integer
' // c2fbefeeebede8eb3a20caf3eff0e8ffedeee220c42ec52e2028632920442d6d6f6e3535
For i = 1000 To 9999
s = CInt((CInt(Mid(CStr(i), 1, 1))) ^ 2 + (CInt(Mid(CStr(i), 2, 1))) ^ 2 + (CInt(Mid(CStr(i), 3, 1))) ^ 2 + (CInt(Mid(CStr(i), 4, 1))) ^ 2)
If s Mod 2 = 0 Or s Mod 3 = 0 Then d += 1
Next
MsgBox(d)
Жми Лучший