• 2022-06-12
    如下int i=1, j=7,a; a=i+(j%4!=0); 则a=_____
  • 2

    内容

    • 0

      假设有定义 int i=0,j=0,a=6;则执行以下语句后,各变量的值依次为() if((i>0)||(j>0))a++; A: i=0,j=0,a=6 B: i=l;j=1;a=7 C: i=1,j=0,a=7 D: i=0;j=1,a=7

    • 1

      以下程序段的输出结果是()。int i,j,m=0;for(i=1;i<=15;i+=4) for(j=3;j<=19;j+=4) m++;printf("%d\n",m);

    • 2

      产生并输出如下形式的方阵。 1 2 2 2 2 2 1 3 1 2 2 2 1 4 3 3 1 2 1 4 4 3 3 3 1 4 4 4 3 3 1 5 1 4 4 3 1 5 5 5 1 4 1 5 5 5 5 5 1 #include "stdio.h" int main() { int a[7][7],i,j; for(i=0;i<7;i++) for(j=0;j<7;j++) if( (1) || i+j==6) a[i][j]=1; else if ( (2) &&i+j<6) a[i][j]=2; else if (i>j&&i+j<6) a[i][j]=3; else if (i i==j ; j==i  ii  i+j>6; j+i>6; 6

    • 3

      【单选题】给出以下代码,请问该程序的运行结果是什么?() class Example{ public static void main(String args[]){ loop1: for(int i=0;i<3;i++){ loop2: for(int j=0;j<3;j++){ if(i==j){ break loop2; } System.out.println("i="+i+"j="+j+""); } } } } A. i=1 j=0 B. i=1 j=0 i=2 j=1 C. i=0 j=1 i=0 j=2 i=1 j=0 i=2 j=0 i=2 j=1 D. i=1j=0 i=2j=0 i=2j=1

    • 4

      下面程序运行后输出的结果是()int i=0, j=9;do{if(i++&gt;--j)break;}while(i&lt;4);System.out.println("i="+i+"and j="+j); A: i=4 and j=4 B: i=5 and j=5 C: i=5 and j=4 D: i=4 and j=5