1樓:匿名使用者
private sub ***mand1_click()dim i as long, j as longdim x1 as long, x2 as longdim str as string
dim flag as boolean
str = "從 10000 到 99999 之間的迴文數有:" & vbcrlf
for i = 10000 to 99999flag = false
for j = 1 to len(cstr(i))if mid(cstr(i), j, 1) <> mid(cstr(i), len(cstr(i)) - j + 1, 1) then
flag = true
exit for
end if
next j
if flag = false then str = str & i & " "
next i
msgbox str
end sub
2樓:匿名使用者
dim str as string
dim i as integer
dim j as integer
dim k as integer
dim l as integer
dim hwdata(899) as integerl=0for i=1 to 9
for j=0 to 9
for k=0 to 9
str=trim(str(i)) & trim(str(j)) & trim(str(k)) & trim(str(j)) & trim(str(i))
hwdata(l)=val(str)
l=l+1
next k
next j
next i
hwdata中儲存得是所有得迴文資料
3樓:匿名使用者
把這些數的個位,十位。百位,千位,萬位分別用變數儲存起來,只要對比個位跟萬位相等,同時十位跟千位相等的就是了。
4樓:桑嬡運昕
樓上有點投機取巧的嫌疑哦,呵呵~~~也試試下面這個啦:
dima
asinteger,bas
integer,cas
integer
fora=1
to9forb=0
to9forc=0
to9printa&
b&c&
b&anext
**ext
bnexta
用VB編寫程式,用VB編寫一個程式
樓上的,不許要引用吧 option explicit private declare function getdrivetype lib kernel32 alias getdrivetypea byval ndrive as string as long private declare funct...
用VB編寫程式,求S A B C ,階乘的計算分別用Su
1 用sub實現的過程bai 如下 du dim a,b,c,s a 1b 2 c 3s 0 sub jc x dim v v 1while x 0 v v x x x 1 wend s s v end sub jc a jc b jc c msgbox s 2 用function的過程zhi如下 ...
用c語言編寫程式,求s1,用C語言編寫程式,求S11223nn1,直到最後一項的絕對值小於
只求從bai第二項起的浮點du 和,把第一項1作為初值zhi直接賦給和dao變數s。如內下 include stdio.h int main int argc,char argv 執行結果如下 最後一項的絕對值小於10的幾次方呀 最後問題顯示沒顯示完整 include stdio.h double ...