IWeb技术与网页制作a.doc
文本预览下载声明
山东财政学院
2006--2007学年第一学期期末考试《Web技术与网页制作》试卷A
(考试时间为100分钟)
学院_________ 班级 ___________ 姓名__________ 学号__________
题号 一 二 三 四 五 总分 得分 阅卷人 合分人 一、写出程序的输出结果(每题6分;共24分)
分析下面的C#程序,指出执行这个程序后,显示结果是什么?
using System;
class Hello {
public static void Main() {
Console.Write(请输入你的名字:);
string str_userName=Console.ReadLine();
if(str_userName==six){
Console.WriteLine(您好!{0},哎呀,是您啊! ,str_userName);
}
else{
Console.WriteLine({0}是哪棵葱? ,str_userName);
}
}
}
请输入你的名字:six
您好! six,哎呀,是您啊!
分析下面的C#程序,指出执行这个程序后,显示结果是什么?
using System;
class Test
{
public static void Main(string[] args)
{
string User = 飞刀;
string Purview = webmaster;
int Age = 21;
if(Purview==webmaster)
{
Console.WriteLine(欢迎您来到ASPCN.COM管理系统);
Console.WriteLine(现在开始验证身份:);
if((User==飞刀) (Age == 21))
{
Console.WriteLine(欢迎您,站长);
Console.WriteLine(现在可以操作本系统);
}
}
else
{
Console.WriteLine(对不起,此系统仅对本工作室人员开放);
}
}
}
欢迎您来到ASPCN.COM管理系统
现在开始验证身份:
欢迎您,站长
现在可以操作本系统
3. 分析下面的C#程序,指出执行这个程序后,显示结果是什么?
using System;
using System.Collections;
class Test
{
public static void Main(string[] args)
{
Hashtable ht = new Hashtable();
ht.Add(feidao,飞刀);
ht.Add(yahao,亚豪);
ht.Add(xuankong,大风);
ht.Add(zsir,逍遥小子);
ht.Add(buding,布丁);
foreach(string htKey in ht.Keys)
{
Console.WriteLine(工作室成员ID:{0}\t中文网名:{1},htKey,ht[htKey].ToString());
}
}
}
工作室成员ID:yahao 中文网名:亚豪
工作室成员ID:xuankong 中文网名:大风
工作室成员ID:buding 中文网名:布丁
工作室成员ID:zsir 中文网名:逍遥小
工作室成员ID:feidao 中文网名:飞刀
4. 分析下面的C#程序,指出执行这个程序后,显示结果是什么?
using System;
public class Test
{
public static void Main(string[] args)
{
int i = 1;
for(;;)
{
if(i=10)
{
Console.WriteLine(当前为第{0}次循环,i);
i++;
continue;
}
else
{
Console.WriteLine(i值大于10,退出循环);
break;
}
}
}
}
当前为第1次循环
当前为第2次循环
当前为第3次循环
当前为第4次循环
当前为第5次循环
当前为第6次循环
当前为第7次循环
当前为第8次循环
当前为第9次循环
当前为第10次循环
i值大于10,退出循环
二、程序填空题(每空3分;共15分)
程序使用了两个TextBox控件
显示全部