|

楼主 |
发表于 2010-1-29 14:13
|
显示全部楼层
[原创] 尹志元_简证命题(1+1)
yzy_dxxj_tb.prg 源文件
————————————————————————————————————————
clea
input "请输入偶数 x 的值:x=" to x
clea
W=x-6
w2=0
w1=w-w2
RW=5
CL=23
l=0
Pn=0
do while l<=W
if CL>70
@rw,cl say "←x1="+str(x1,12)
@rw+1,cl say "←x2="+str(x2,12)
CL=23
RW=RW+2
endif
x1=3+w1
x2=3+w2
if rw>28
wait && 分页暂停
clea
rw=5
endif
if cl=23
@RW,0 say "L3(>):x1="+str(x1,12)+"→"
@RW+1,0 say "L3(<):x2="+str(x2,12)+"→"
endif
i=2
do while i<=sqrt(x1)
if int(x1/i)=x1/i
exit
endif
i=i+1
enddo
if i>sqrt(x1)
p1=';1';
else
p1=';0';
endif
j=2
do while j<=sqrt(x2)
if int(x2/j)=x2/j
exit
endif
j=j+1
enddo
if j>sqrt(x2)
p2=';1';
else
p2=';0';
endif
if p1=';1';.and.p2=';1';
@RW,CL say P1 +"←x1="+str(x1,12)color +w/G
@rw+1,cl say p2 +"←x2="+str(x2,12)color +W/B
Pn=Pn+1
wait';'; && 观察“同时出现”素数“1”及其对应值,
&& 点击任意键;
&& 如欲连续输出,请在 WAIT';';前面加“*”或按住任意键。
else
@RW,CL say P1
@rw+1,cl say p2
endif
if p1=';1';.and.p2=';1';.and.x1=x2
@RW,CL say P1 color +w/*R
@RW+1,cl say p2 color +W/*R
endif
w2=w2+1
w1=w1-1
cl=cl+1
l=l+1
@1,21 say"尹志元:《简证命题(1+1)》L6→[L3(>)+L3(<)]_倒序相加"color B*/+W
@2,12 say"----------------------------------------------------------------------"
@3,12 say" (用“1”与“0”表素数与合数。当x1=x2=x/2同为素数“1”时,显示红色)"
@4,1 say"x=x1+x2="+STR(x,12)
enddo
@30,10say"Dx(1,1)="+str(Pn,12)
@31,10say" x(1,1)="+str(Pn/2,12)+" >0.5*x/(Log(x))^2="+str(0.5*x/(Log(x))^2,12)
@32,23 say"(yzy_dxxj_tb.prg - Microsoft Visual FoxPro)" && dxxj—倒序相加;tb--图表.
@RW,CL say "←x1="+str(x1,12)
@RW+1,CL say "←x2="+str(x2,12)
CLOSE DATA ALL
只需在计算机上安装 VF(Microsoft Visual FoxPro)
6.0或以上的简体中文版,既可点击下面压缩文件中的程
序yzy_dxxj_tb.prg 运行之,生成 《简证命题(1+1)》
中的【图 1】。也可把上面的 源文件 复制成 prg 程序
运行之。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|