- 1、本文档共5页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 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.
您可能关注的文档
- 世纪英语 第四章.ppt
- 【优化方案】2013高二英语成盘精品课件 福建专用:Unit3 SectionⅡ(新人教版必修5.ppt
- using language 讲课.ppt
- 英语表演.ppt
- harebrained.doc
- vf实验表单设计.doc
- 旅游英语高频词汇.doc
- General test Application Form-NB.doc
- 大学体验英语综合教程 翻译答案.doc
- 人教版新目标九年级英语Unit5_What_are_the_shirts_made_of_SectionA第二课时.ppt
- 四川省德阳市罗江中学2025届高三考前热身化学试卷含解析.doc
- 山东省枣庄现代实验学校2025届高三下学期第五次调研考试化学试题含解析.doc
- 吉林省长春市十一高中等九校教育联盟2025届高三一诊考试生物试卷含解析.doc
- 2025届江苏省盐城市伍佑中学高考仿真模拟化学试卷含解析.doc
- 2025届广西贺州中学高考冲刺押题(最后一卷)生物试卷含解析.doc
- 安徽省池州市贵池区2025届高三第一次模拟考试生物试卷含解析.doc
- 宁夏银川一中2025届高三(最后冲刺)化学试卷含解析.doc
- 广东省广州市增城区四校联考2025届高考压轴卷化学试卷含解析.doc
- 2025届邯郸市第一中学高考生物必刷试卷含解析.doc
- 2025届安徽省安庆市石化第一中学高考仿真卷化学试卷含解析.doc
文档评论(0)