VF数字化程序及表单设计.doc

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VF数字化程序及表单设计

数字化程序及表单设计 1.(prog1.prg,form1.scx)已知圆半径,求圆面积。 clear input请输入圆的半径= to r if r0 s=pi()*r*r ?s else ?输入错误! endif return r=thisform.text1.value s=pi()*r*r thisform.text2.value=alltrim(str(s,10,2)) 4.(prog2.prg,form2.scx)已知三角形三边,求三角形的面积。S=SQRT(L*(L-A)*(L-B)*(L-C)) ,其中L=(A+B+C)/2 clear inputa= to a inputb= to b inputc= to c if a0 b0 c0 a+bc a+cb b+ca l=(a+b+c)/2 s=sqrt(l*(l-a)*(l-b)*(l-c)) ?s else ?输入错误 Endif a=thisform.text1.value b=thisform.text2.value c=thisform.text3.value if a+bc and b+ca and a+cb and a0 and b0 and c0 l=(a+b+c)/2 s=sqrt(l*(l-a)*(l-b)*(l-c)) endif thisform.text4.value=s 5.(prog3.prg,form3.scx)判断某一年是否是闰年。 clear input请输入年份: to year if year%400=0 ?year,年是闰年! else ?year,年不是润年! endif return year=thisform.text1.value if year%400=0 thisform.text2.value= 是闰年 else thisform.text2.value= 不是闰年 endif 6.(prog4.prg,form4.scx)判断月份值的春夏秋冬。 clear input请输入月份: to yue do case case inlist (yue,3,4,5) ?春 case inlist (yue,6,7,8) ?夏 case inlist (yue,9,10,11) ?秋 case inlist (yue,12,1,2) ?冬 otherwise ?输入错误 endcase return yue=thisform.text1.value do case case inlist (yue,3,4,5) thisform.text2.value=春 case inlist (yue,6,7,8) thisform.text2.value=夏 case inlist (yue,9,10,11) thisform.text2.value=秋 case inlist (yue,12,1,2) thisform.text2.value=冬 endcase 2.(prog5.prg,form5.scx)输入一个整数,并判断其奇偶性。 clear input请输入一个数:to n if mod(n,2)=0 ?偶数 else ?奇数 Endif x=thisform.text1.value if mod(x,2)=0 thisform.text2.value=偶数 else thisform.text2.value=奇数 endif 7.(prog6.prg,form6.scx)输入成绩,判断等级。 clear input 请输入成绩: to a do case case a=0 and a=60 cj=差 case a60 and a90 cj=良 case a=90 and a=100 cj=优 otherwise cj=错误 endcase ?cj return a=thisform.text1.value do case case a=0 and a=60 cj=差 case a60 and a90 cj=良 case a=90 and a=100 cj=优 otherwise cj=错误 endcase thisform.label2.caption=cj 8.(prog7.

文档评论(0)

sh4125733 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档