下面代码的输出结果是( )。int x = 5;int y = x++;Console.Write(y+" ");y = ++x;Console.Write(y);
A: 5 6
B: 6 7
C: 5 5
D: 5 7
A: 5 6
B: 6 7
C: 5 5
D: 5 7
举一反三
- 下面代码的输出结果是。int x = 5;int y = x++;Console.Write(y+" ");y = ++x;Console.Write(y);
- 下面代码的输出结果是()。 int x = 5; int y = x++; Console.WriteLine(y); y = ++x; Console.WriteLine(y);
- 分析以下C#代码,其运行结果是______ using System;class Test{ public static void Main() { int x = 5; int y = x++; y=++x; Console.Write (y); }}
- 哪个是如下代码的输出结果:(). double x = 5.5; int y = (int)x; System.out.println("x is " + x + " and y is " + y); A: x is 5 and y is 6 B: x is 6.0 and y is 6.0 C: x is 6 and y is 6 D: x is 5.5 and y is 5
- 下列代码的输出结果是___________________ for (int y=1; y<=5; y++) { for (int x=1; x<y; x++) { System.out.print(" "); } for (int z=y; z<=5; z++) { System.out.print("*"); } System.out.println(); }