这道题我非做不可!因为我很讨厌带有中文的变量,如上:"o_int个位"
(抱歉).
sub main()
dim int1 as integer=100
dim intxp1,intxp2,intxp3 as integer
dim str1 as string
do while int1<=999
str1=cstr(int1)
intxp1=cint(mid(str1,1,1)) '截取字符,转换变量类型
intxp2=cint(mid(str1,2,1))
intxp3=cint(mid(str1,3,1))
if (intxp1^3+intxp2^3+intxp3^3)=int1 then
system.console.writeline(int1)
end if
int1+=1
loop
system.console.readline() '只用来查看结果
end sub