我回答一下吧先回答问题,能可以更换为i7 870、i7 850、i7 880这三款但是,建议别换了,换个新平台吧HD 5450的显卡、2G 1333Hz的内存都该淘汰了,LGA 1156针的主板限制了只能使用旧构架的那三款i7,意义不大虽然i7 870等性能也强悍,但是确实还是有差距了,而且你的平台也不好了
'不停的输入,直到n=-1时结束的程序:
function ss(byval x as integer) as integer
dim as integer i,f
f=0
for i=2 to x-1
if x mod i=0 then f=1
next i
if x<2 then f=1
if f=1 then ss=1 else ss=0
end function
dim as longint n,i
do
f=0
do
if f=0 then f=1 else "输入错误!请输入大于6的偶数!"
input "n=",n
loop until (n>5 and n mod 2=0) or n=-1
if n=-1 then end
for i=2 to n\2
if ss(i)=0 and ss(n-i)=0 then n;"=";i;"+";n-i
next i
"输入-1时结束"
loop
'如果是一次性的,则为:
function ss(byval x as integer) as integer
dim as integer i,f
f=0
for i=2 to x-1
if x mod i=0 then f=1
next i
if x<2 then f=1
if f=1 then ss=1 else ss=0
end function
dim as longint n,i
f=0
do
if f=0 then f=1 else "输入错误!请输入大于6的偶数!"
input "n=",n
loop until (n>5 and n mod 2=0) or n=-1
if n=-1 then end
for i=2 to n\2
if ss(i)=0 and ss(n-i)=0 then n;"=";i;"+";n-i
next i
sleep
以上就是关于freebasic里如何执行子程序,又怎么跳回来全部的内容,包括:freebasic里如何执行子程序,又怎么跳回来、freebasic验证哥德巴赫猜想、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)