云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 南京工业大学VB期末考试复习3

南京工业大学VB期末考试复习3

  • 62 次阅读
  • 3 次下载
  • 2025/5/29 22:57:14

Private Sub Form_Click( )

Dim i As Integer,j As integer,n As integer N=val(txtinput) Fori=3 to n-2step 2 If ___(1)__ Then

if n-i>=i and__(2)________ then print n;\ endif End If Nexti End sub

Private Function Prime(n as integer) as boolean dim i as integer,,j as integer,,flg as boolean prime =false for i=2 to sqr(n)

if n mod i=0 then___(3)_____ nexti

Prime=true End function End If Next i End Sub

3、下面和程序功能是将一个由字母与数字相混的字符串中选出字符串,并把该字符串在窗体上打印出来,请完善下面程序。

Option Explicit

Private Sub Command1_Click( ) Dim s As String,k As Integer

Dim r As String,i As Integer,t As String s=“aa11bb22Cc33” For i=1 To Len(s) t= (1)

If t>=“a”And t<=“z”Or t>=“A”And t<=“Z”Then ____(2)___ End If Next i Print r End Sub

4、如下程序,运行的结果是____________,若将A语句改为Static i%,运行的结果是___________。Sub Proc(a%())

Dim i% 'A Do

a(i)=a(i)+a(i+1) i=i+1

Loop While i<2 End Sub

Private Sub Command1_Click() Dim m%, i%, x%(10) For i=0 To 4 x(i)=i+1 Next i

For i=1 To 2 Call Proc(x) Next i

For I=0 To 4 Print x(i); Next i End Sub

5、2Sinx+3Cosx+Tan2x+LnxLny的VB表达式为________

参考答案

1.d,2.b,3.d,4.b,5.b,6.b,7.c,8.b,9.d,10.c,11.b,12.b,13.c,14.c,15.a,16.c,17.c,18.c,19.a,20.a,21.a,22.a,23.d,24.b,25.b,26.c,27.b,28.c,29.b,30.c,31.b,32.d,33.d,34.a,35.c,36.b,37.d,38.a,39.c,40.a

1.Xx,XxYyZz,2.prime(i),prime(n-i),Exit function,3.mid(s,i,1),r=r & t,4.8 8 3 4 5,3 5 7 4 5,5.2*sin(x)+3*cos(x)+tan(2*x)+log(x)*log(y)

搜索更多关于: 南京工业大学VB期末考试复习3 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

Private Sub Form_Click( ) Dim i As Integer,j As integer,n As integer N=val(txtinput) Fori=3 to n-2step 2 If ___(1)__ Then if n-i>=i and__(2)________ then print n;\ endif End If Nexti End sub Private Function Prime(n as integer) as boolean dim i as integer,,j as integer,,flg as boolean prime =false for i=2 to sqr(n) if n mod i=0 then___(3)_____ nexti Prime=t

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com