vb操作题

时间:2022-06-06 07:18:50 阅读: 最新文章 文档下载
说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。
vb操作题

四川高中程序操作(36)专项模拟题 一、程序的顺序结构(18中考一道题)

1、已知正方形的边长A8,下列程序的功能是计算正方形的周长L。请将程序缺失部分补充完整。

Function func() Dim A As Single Dim L As Single A = 8

L =_______________ Func = "正方形的周长" & L End Function

2、变量R为半径,计算圆周长L(圆周率取3.14) Dim R As Single Dim L As Single R = 5

L =_____________

3、从键盘输入圆的半径R,输出圆的周长L和面积S,补充完整下列程序段。 Dim R As Single, L As Single, S As Single _______= InputBox("输入半径R") L = 2 * 3.14 * R S = 3.14 * R * R Print "圆的周长是";L


Print "圆的半径是";S

4 20126月,小李同学参加了一场考试,其中有一道题目是:已知长方体的长为10,宽为3,高为5,求长方体的体积V,小李同学编写出了如下的不完整程序。

Dim A As Single Dim B As Single Dim H As Single Dim V As Single A = 10 B = 3 H = 5

V =___________

func = "长方体的体积V=" & V

520126月,小李同学参加了一场考试,其中有一道题目是:已知变量a值为2011,变量b的值为2012,交换变量ab的值。小李同学编写出了如下的不完整程序。

Function func() Dim a As Single Dim b As Single Dim c As Single a = 2011 b = 2012 _____________ a=b


b = t

func = "a=" & a & " b=" & b End Function

620126月,小李同学参加了一场考试,其中有一道题目是:已知变量a值为2011,变量b的值为2012,交换变量ab的值。小李同学编写出了如下的不完整程序。

Function func() Dim a As Single Dim b As Single Dim c As Single a = 2011 b = 2012 t = a

_______________ b = t

func = "a=" & a & " b=" & b End Function

720126月,小李同学参加了一场考试,其中有一道题目是:已知变量a值为2011,变量b的值为2012,交换变量ab的值。小李同学编写出了如下的不完整程序。

Function func() Dim a As Single Dim b As Single Dim c As Single


本文来源:https://www.wddqw.com/doc/0357e451d3f34693daef5ef7ba0d4a7303766ce5.html