C#程序题运行结果题,设计的挺深入的,看懂了就厉害了。
三 写出运行结果题
(1)
using System;
class Program
{
static void Main()
{
int x = 3;
Console.Write("星期:");
Console.WriteLine((Weekday)x);
Console.Write("月份:");
Console.WriteLine((Month)x);
Console.Write("季节:");
Console.WriteLine((Season)x);
}
enum Weekday
{
未知 = -1, 星期天, 星期一, 星期二, 星期三, 星期四,星期五,星期六 }
enum Month
{
一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月, 未知 = -1
}
enum Season
{
春, 夏 = 2, 秋 = 4, 冬 = 8
}
}
(2)
using System;
class Program
{
static void Main()
{
class1 c1 = new class1();
class1.y = 5;
c1.Output();
class1 c2 = new class1();
c2.Output();
}

}
程序运行结果练习题_IT/计算机_专业资料。一、程序运行结果 1、 假设数据表文件...S ___ 9、 main.prg set talk off a=5 b=”c” c=10 do p1 with...
《C#程序设计》习题集---by 熊猫 《C#程序设计》 习题集 班级:___ 学号:_...} } } a)abc b)a c)b d)C 12、在 C#中,下列代码的运行结果是(c) ...
C Object D Int32 B System 1.下列程序的运行结果是 //Exam1.cs using System; class Using { 99.44 。 public static void Main() { int i=918; ...
同系列文档 C#程序题集合-编程题 C#程序题集合-程序填空题 C#程序题集合-判断题 C#程序题集合-运行结果题1/2 相关文档推荐 C语言选择题集合 238页 2财富值 C...
C#程序题集合-判断题 C#程序题集合-选择题 C#程序题集合-运行结果题1...c1 = new Contact("赵丽"); c1["办公电话"] = "010-1234567"; c1["...
减少空间 C. 提高速度 D. 使用方便,提高可读性 三、程序阅读题(每小题 6 分,共 24 分) 程序阅读题( 1. 写出以下程序运行结果。 using System; class Test...
写出程序运行结果和编程题03格式_计算机软件及应用_IT/计算机_专业资料。写出程序运行结果 1、下面程序的运行结果是:___ void swap1(int c[]) { int t; t=...
c语言程序阅读填空、运行结果、改错题_IT/计算机_专业资料。高考信息三、读程序题 1、float f=3.1415927; printf(“%f,%5.4f,%3.3f”,f,f,f) ; 则程序...
《C#程序设计》练习题一 一.选择题 1.C#中每个 int 类型的变量占用___个字节...} finally { Console.WriteLine("finally"); } } } 请问代码运行结果是( )...
( B A . 命名空间不能嵌套另一个命名空间 5. 在 C#中,( C A. public ...{ ( get{return stringSet.Length;} ) }}} 4.写出下面程序的运行结果。 写出...
热门文档