《C#程序设计》考试试卷(A) .pdfVIP

  • 29
  • 0
  • 约9.86千字
  • 约 16页
  • 2023-12-02 发布于河南
  • 举报
《C#程序设计》考试试卷(A) 1.下面(B )是合法的变量名。 A .accp5.0 B ._Csharp C .99s D .Main 2 .下面这段代码的输出为(A ) A.进入了if B.进入了if,进入了else C.进入了else D.进入了if ,进入了else if,进入了else int year = 2046; if (year % 2 == 0) { Console.WriteLine(“进入了if); } else if (year % 3 == 0) { Console.WriteLine(进入了else if); } else { Console.WriteLine(进入了else); } Console.ReadLine(); 3.下面程序的输出结果是( D ) A)1 B)2 C)4.5 D)4 static void Main(string[] args) { int a=5,b =2; float x=4.5f, y=3.0f, u; u=a/3+b__/y+1/2; Console .WriteLine ({0},u); Console.ReadLine(); } 4 .运行下面这段代码的结果为(D

文档评论(0)

1亿VIP精品文档

相关文档