下列程序计算Sn的值。Sn=a+aa+aaa+…a,其中最后一项为n个。
例如:a=5,n=4时,则Sn=5+55+555+5555。请在空白处填入适当的内容,将程序补充完整。
Private Sub Command1_Click()
Dim a As Integer, n As Integer, Cout As Integer
Dim Sn As Long, Tn As Long
Cout = 1
Sn =0
Tn =0
a = InputBox("请输入a的值:" )
【 】
Do
Tn =Tn * 10 + a
Sn = Sn + Tn
Cout = Cout + 1
【 】
Debug. Print a, n, Sn
End Sub
如图1所示,某校园网使用3台Catalyst6500交换机构成万兆以太网的主干,其中交换机S1使用千兆以太网技术下连到学生宿舍楼的一台Catalyst3548交换机S4,S4下连的用户被划分在VLAN ID为2~5,VLAN名为jszx2~jszx5的4个VLAN中,标注S1和S4之间使用IEEE802.1Q国际标准,且在S1和S4之间只允许传输jszx2~jszx5的信息。
请阅读下列关于交换机S4的VLAN配置信息,并补充空白处的配置命令或参数,按题目要求完成交换机S4的相关配置。
Switch-S4-3548 vlan data
Switch-S4-3548 (vlan) vlan2 name jszx2
Switch-S4-3548 (vlan) vlan3 name jszx3
Switch-S4-3548 (vlan) vlan4 name jszx4
Switch-S4-3548 (vlan) vlan5 name jszx5
Switch-S4-3548 (vlan) exit
Switch-S4-3548 configure terminal Switch-S4-3548 (config) interface (6) (进入端口配置模式)
Switch-S4-3548 (config-if) switchport (7) (配置VLAN trunk模式)
Switch-S4-3548 (config-if) switchport trunk encapsulation (8) (封装协议)
Switch-S4-3548 (config-if) switchport truck allowed (9) (设置可中继的VLAN)
Switch-S4-3548 (config-if) switchport truck allowed (10) (去除不允许中继的VLAN)
Switch-S4-3548 (config-if) exit
Switch-S4-3548 (config) exit Switch-S4-3548
(6)
按后根次序遍历树等同于按__根遍历对应的二叉树。
标准的URL由3部分组成:服务器类型、__和路径及文件名。
设有定义语句:double x=2.5, y=4.7;int a=7;那么表达式x+a%3*(int)(x+ y)%2/4的值为【 】。
下列程序的输出结果为:
bjectid=O
biectid=1
请将程序补充完整。
include<iostream>
using namespace std;
class Point
{
public:
Point(int xx=0,int yy=0){X=xx;Y=yy;countP++;}
~Point(){countP--;}
int GetX(){return X;}
int GetY(){return Y;}
static void GetC(){cout<<"Object id="<<countP<<endl;}
private:
int X,Y;
static int countP;
};
______//静态数据成员的初始化
int main()
{
Point::GetC();
Point A(4,5);
A.GetC();
return 0;
}