回 帖 发 新 帖 刷新版面

主题:车牌号码

由五个号码(A,E,K,9,7)组成的不同且不重复的车牌号码共有几个,并打印出来.

回复列表 (共3个回复)

沙发

http://www.nokia6500.com.cn/show.php?id=11078720

板凳

若有K个数
p=1
for i=1 to k
p=p*i
next i
print p
则P为个数
K的阶层
我的理解是不是错了啊?

3 楼

cls
dim a$(5)
for i=1 to 5
read a$(i)
next i
data "A","E","K","9","7"
for i=1 to 5
for j=1 to 5
for k=1 to 5
for l=1 to 5
for m=1 to 5
if i+j+k+l+m=15 and i*j*k*l*m=120 then
print a$(i),a$(j),a$(k),a$(l),a$(m)
z=z+1
end if
next m,l,k,j,i
? "有";z;"个"
end

我来回复

您尚未登录,请登录后再回复。点此登录或注册