int x = 3,y = 4;以下哪条输出语句正确?
A: Console.WriteLine("x={x},y={y}", x,y);
B: Console.WriteLine("x={x},y={y}");
C: Console.WriteLine("x={0},y={1}", x,y);
D: Console.WriteLine("x={1},y={2}", x,y);
A: Console.WriteLine("x={x},y={y}", x,y);
B: Console.WriteLine("x={x},y={y}");
C: Console.WriteLine("x={0},y={1}", x,y);
D: Console.WriteLine("x={1},y={2}", x,y);
举一反三
- int x = 3,y = 4;以下哪条输出语句正确? A: Console.WriteLine("x={x},y={y}", x,y); B: Console.WriteLine("x={x},y={y}"); C: Console.WriteLine("x={0},y={1}", x,y); D: Console.WriteLine("x={1},y={2}", x,y);
- 读程序写结果.static void Main(string[] args){int X = 0;int Y =X++;Console.WriteLine("Y={0}", Y);Console.WriteLine("X={0}", X);Y = --X;Console.WriteLine("Y={0}", Y);Console.WriteLine("X={0}", X);}程序运行结果为: A: Y=0 B: X=1 C: Y=0 D: X=0
- 下面代码的输出结果是()。 int x = 5; int y = x++; Console.WriteLine(y); y = ++x; Console.WriteLine(y);
- 1. 写出以下程序的运行结果。 class Test { public static void Main() { int x = 5; int y = x++; Console.WriteLine(y); y=++x; Console.WriteLine(y); Console.WriteLine(x); } } 运行结果:
- using System; class Test { public static void Main() { int x = 5; int y = x++; Console.WriteLine(y); y=++x; Console.WriteLine(y); } }