【vbs】1000到9999之间有多少个各位数字不同
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/23 10:06:48
【vbs】1000到9999之间有多少个各位数字不同
求该VBS,谢谢
求该VBS,谢谢
dim num,c,i,bool,chr
for c=1000 to 9999
for i=1 to 3
if instr(instr(1,c,mid(c,i,1))+1,c,mid(c,i,1))0 then
bool=false
exit for
else
bool=true
end if
next
if bool then num=num+1:chr=chr & c & vbCr
next
msgbox num
msgbox chr
总共4536个
第二种方法,要简单点,.
dim num,c,i,bool,chr,arr()
for c=1000 to 9999
redim arr(10)
for i=1 to 4
if arr(mid(c,i,1))=true then
bool=false
exit for
else
arr(mid(c,i,1))=true
bool=true
end if
next
if bool then num=num+1:chr=chr & c & vbCr
next
msgbox num
msgbox ch
for c=1000 to 9999
for i=1 to 3
if instr(instr(1,c,mid(c,i,1))+1,c,mid(c,i,1))0 then
bool=false
exit for
else
bool=true
end if
next
if bool then num=num+1:chr=chr & c & vbCr
next
msgbox num
msgbox chr
总共4536个
第二种方法,要简单点,.
dim num,c,i,bool,chr,arr()
for c=1000 to 9999
redim arr(10)
for i=1 to 4
if arr(mid(c,i,1))=true then
bool=false
exit for
else
arr(mid(c,i,1))=true
bool=true
end if
next
if bool then num=num+1:chr=chr & c & vbCr
next
msgbox num
msgbox ch
【vbs】1000到9999之间有多少个各位数字不同
【200分高悬赏】1000到9999之间有多少个各位数字不同
在1000到9999之间有多少个各位数字不同的奇数?
1000到9999之间共多少个数字
用do...while语句实现:求100~1000之间有多少个整数,其各位数字之和为5.
在100和1000000之间有多少个整数,其各位数字之和等于5
在1000到9999之间,千位数字与十位数字之差为2(大减小)并且4个数字各不相同的四位数有多少个?
1到1000(包括1和1000)这些数中,有多少个整数的各位数字之和小于7?
求助C语言编程:求100到1000之间有多少个每位上数字相乘为48的整数
在3000到8000之间有多少个无重复数字的奇数?
在100到500之间的整数中,包含数字2的数有多少个
1到33,取其中6个不同的数字相加.请问有多少种方法?