有没有什么vf代码?

来源:百度知道 编辑:UC知道 时间:2024/06/27 16:29:52
现在学VF,想看点代码,来借鉴借鉴!

这是我自己写的一个小程序解一元二次方程的
比较简单请勿见怪,哈哈,,

* 计算一元二次方程,的小程序供大家玩一下哈哈*
input "请输入a的值" to k
if k=0
loop
endif
input "请输入b的值" to l
input" 请输入c的值" to j
song=l^2-4*k*j
if song<0
?"没有实根"
else
if song=0
?"有两个相同的实根" ,-l/2*k
else
if song>0
?"有两个实根"
x1=-l-sqrt(song)/2*k
x2=-l+sqrt(song)/2*k
? "x1=",x1
? "x2=",x2
endif
endif
endif
q=""
wait "q 退出 其它键继续" to ying
if ying="q"
?"欢迎下次你再使用本软件"
return
else
do tian
endif