A: 21
B: 22
C: 23
D: 66
举一反三
- 在C#中,下列代码的运行结果是()using System;class Test{Public static void Main(string[] args){int a=21,b=22,c=23;if(a<;b)Console.WriteLine(b);elseConsole.WriteLine(a+b+c);}} A: 21 B: 22 C: 23 D: 66
- 1)在C#中,下列代码的运行结果是( )。(选择一项) using System; class Test{ static void Main(string[] args){ int a = 21; int b = 22; int c = 23; if (a < b) { Console.WriteLine(b); } else { Console.WriteLine(a + b + c); } } } A: A.21 B: B.22 C: C.23 D: D.66
- 写出以下程序的输出结果。using System; class Program { public static void Main(string[] args) { int a=5,b=4,c=6,d; Console.WriteLine(“{0}”,d=a>b?(a>c?a:c):b); } }运行结果:_________。
- using System; class Test { public static void Main() { int x = 5; int y = x++; Console.WriteLine(y); y=++x; Console.WriteLine(y); } }
- 以下程序的输出结果是() using System; class Program { public static void Main(string[] args) { int a=5,b=4,c=6,d; Console.WriteLine(“{0}”,d=a>b?(a>c?a:c):b); } } A: 5 B: 4 C: 6 D: 不确定
内容
- 0
下列程序的运行结果是()public class Test {public static void main(String[] args) {String str = NULL;System.out.println(str);}} A:
- 1
写出以下程序的运行结果。using System;class Test{public static void Main(){int x = 5;int y = x++;Console.WriteLine(y);//第1空y=++x;Console.WriteLine(y);//第2空}}
- 2
public class Test { public static void main(String[] args) { String s1 = "abc"; String s2 = new String ("abc"); System.out.println(s1 == s2); } } 程序运行结果是
- 3
1. 写出以下程序的运行结果。 class Test { public static void Main() { int x = 5; int y = x++; Console.WriteLine(y); y=++x; Console.WriteLine(y); Console.WriteLine(x); } } 运行结果:
- 4
using System; class Test { public static void Main () { int[ ] a ={2,4,6,8,10,12,14,16,18}; for (int i=0; i<9; i++) { Console.write(“ ”+a[i]); if ((i+1)%3==0) Console.writeLine(); } } }[/i]