vb a = i \ 100For i = 100 To 999a = i \ 100b = (i Mod 100) \ 10c = i Mod 10If i = a ^ 3 + b ^ 3 + c ^ 3 Thenst = i & "=" & a & "^3+" & b & "^3+" & c & "^3"List1.AddItem stEnd IfNext i我不懂“\”什么意思,数学里是和mod一个意思,vb呢
2019-05-30
vb a = i \ 100
For i = 100 To 999
a = i \ 100
b = (i Mod 100) \ 10
c = i Mod 10
If i = a ^ 3 + b ^ 3 + c ^ 3 Then
st = i & "=" & a & "^3+" & b & "^3+" & c & "^3"
List1.AddItem st
End If
Next i
我不懂“\”什么意思,数学里是和mod一个意思,vb呢
优质解答
\取商的整数部分,mod是取余数
如
10\3=3
10 mod 3=1
\取商的整数部分,mod是取余数
如
10\3=3
10 mod 3=1