读程序写结果.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
A: Y=0
B: X=1
C: Y=0
D: X=0
举一反三
- 写出下列程序的运行结果 void main() { int x=10,y=10; Console.WriteLine("x={0},y={1}",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);
- 1. 写出以下程序的运行结果。 class Test { public static void Main() { int x = 5; int y = x++; Console.WriteLine(y); y=++x; Console.WriteLine(y); Console.WriteLine(x); } } 运行结果:
- 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){Console.WriteLine("请输入一个整数");string x = Console .ReadLine ();int y = int.Parse (x);for(int i=0;i<;x.Length ;i++){Console.Write(y%10);;}}