• 2022-06-06
    以下不正确的单行结构条件语句是()。
    A: AIf x<0 Then y=2*x-1: Write(x) End If
    B: BIf x>y Then Write(x>y)
    C: CIf x Then t=t*x
    D: DIf x Mod 3=2 Then Write(x)
  • A

    内容

    • 0

      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

      分段函数:[img=206x91]18037123bea18f3.png[/img],下面程序段中正确的是__________。 A: If x < 0 Then y = 0If x < 1 Then y = 1If x < 2 Then y = 2If x >= 2 Then y = 3 B: If x > =2 Then y = 3ElseIf x > =1 Then y = 2ElseIf x > =0 Then y = 1Else y = 0End If C: If x >= 2 Then y = 3If x >= 1 Then y = 2If x > 0 Then y = 1If x < 0 Then y = 0 D: If x < 0 Then y = 0ElseIf x > 0 Then y = 1ElseIf x > 1 Then y = 2Else y = 3End If E: If x < 0 Then y = 0If 0 <= x <1 Then y = 1If 1 <= x < 2 Then y = 2If x >= 2 Then y = 3

    • 2

      declare @x int,@y int,@t int set @x=1 set @y=2 begin set @t=@x set @x=@y set @y=@t end print @x

    • 3

      运行下列程序段后,x的值是() int x=1,y=2,t=3; if(x>y) t=x; x=y; y=t;

    • 4

      已知:int x=1,y=2,t;,则执行语句:t=x,y=x,x=t;后x、y的值分别是______