1
dim i as integer, a as integer, b as integer, c as integer
for i = 100 to 999
a = i \ 100
b = (i mod 100)\10
c = i mod 10
if a*a*a+b*b*b+c*c*c = i then
print i;"是水仙花数"
end if
next
2
如果一个数N是素数 必须满足 不能被2-sqr(N)中的任何一个自然数整除
算法说明了
具体程序代码略过
3
这道题目 用枚举的算法
dim x as integer,y as interger,z as integer
'x 公鸡,y 母鸡, z 小鸡
for x = 0 to 20
for y = 0 to 33
z = 100 -x -y
if 5*x +3*y +z/3 = 100 then
print "公";x,"母";y,"小";z
end if
next y,x
你需要流程图吗 我可以画一张