下面程序把数组元素中的最大值放入a[0]中。则在if语句中的条件表达式应该是 main() {inta[10]={6,7,2,9,1,10,5,8,4,3},*p=a,i; for(i=0;i<10;i++,p++) if(________)*a=*p; printf("%d",*a); }
下列程序段执行结果为() x = 5 y = -6 If Not x < 0 Then x = y - 3 Else y = x + 3 Print y - x; x - y
以下程序的调试结果为?1. public class EqualsTest{2. public static void main(String args[]){3. Long LA = new Long(7);4. Long LB = new Long(7);5. if(LA==LB) System.out.println(Equal);6. else System.out.println(Not Equal);7. }8. }
已知a,b,c的值分别是4,5,6,执行下面的程序段后,判断变量N的值为( )。if(c>b+2)N=a+b;else if(a+b
已知函数Fact的程序如下,在执行Fact(4)的过程中,Fact函数被调用的次数为_____。1. Long Int Fact(int n)2. { Long Int x;3. If (n > 1)4. { x = Fact(n-1);5. return (n+x)*2; }6. else return 1;7. }
已知函数Fact的程序如下,Fact(4)的值为_____。1. Long Int Fact(int n)2. { Long Int x;3. If (n > 1)4. { x = Fact(n-1);5. return (n+x)*2; }6. else return 1;7. }
当a = 1, b = 3, c = 5, d = 4时,执行完下面一段程序后x的值是_____。 if ( a < b) if(c < d) x = 1; else if (a < c) if(b < d) x = 2; else x = 3; else x = 6; else x = 7;
以下代码的调试结果为?1: public class Q102: {3: public static void main(String[] args)4: {5: int i = 10;6: int j = 10;7: boolean b = false;8:9: if( b = i == j)10: System.out.println(\True\);11: else12: System.out.println(\False\);13: }14: }
#include void main( ){ int x,y=1,z;if ((z=y)<0) x=4;else if(y==0) x=5;else x=6;printf(\%d,%d\\n\,x,y);}
下来程序段执行结果为( )。 x = 5 y = -6 If Not x > 0 Then x = y - 3 Else y = x + 3 End If print x - y;y - x
以下程序的运行结果是 。#includemain(){int x,y=-2,z=0;if((z=y)<0) x=4;else if(y==0) x=5;else x=6;printf(\\\t%d\\t%d\\n\,x,z);if(z=(y==0))x=5;x=4;printf(\\\t%d\\t%d\\n\,x,z);if(x=z=y) x=4;printf(\\\t%d\\t%d\\n\,x,z);}
已知程序如下,若X=30, Y=30, Z=30该程序执行完成后,X的值为_____。1. X = Z + Y;2. If Y < Z {3. X = X – Y; }4. Else{5. X= X – Z; }6. X = X – Y;7. If X < Z { X = Y +20; }8. X = X – Z;9. If X > Y { X = X – Y; }
已知有if-else语句如下,则与该if-else语句等价的条件表达式是()。 if(x > y) a = 3; else a = 5;
执行下列语句后整型变量a的值是()。If(3-2)>2 Thena=10Else If(10/2)=6 Thena=20Elsea=30End IfA.
执行下列语句后整型变量a的值是 ______。If(3-2)>2 Then a=10 Else If(10/2)=6 Then a=20Else a=3
1、若a=1,b=3,c=5,d=4,则执行下面程序段后x的值是()。 if (a<b) if (c<d) x=1 ; else if (a<c) if (b<d) x=2 ; else x=3 ; else x=6 ; else x=7 ;
8、当a=1,b=2,c=4,d=3时,执行完下面一段程序后x的值是()。 if(a<b) if(c<d) x=1; else if(a<c) if(b<d) x=2; else x=3; else x=4; else x=5;
以下代码输出结果是:if(5>3>1)printf(“ok”);else printf(“no”)()
6、设初始化int a=0,b=0,c=0,x=9;则执行下列语句之后,变量x的值是 if (a) x--; else if(b) if(!c)x=3; else x=4;
图6.2(a)表示MDS图,请画出对应的ASM流程图,并采用链接式的if-then-else语句写出它们的表达式.
以下程序的运行结果是()。void main(){ int a;if(a=6) printf("%d/n",a);else if(a>6) printf("%d/n",a+2);else printf("%d/n",a+3);}
已知 a,b,c的值分别是 4,5,6,执行下面的程序段后,判断变量 n的值为____ if(c<b) n=a+b+c; else if(a+b<c) n=c-a-b; else n=a+b;
3、执行以下程序段后x ,y的值是() x=5;y=6; if (x>=5) x=x+1; else y=y+1;
1、执行下列事件过程,y的值为()。 Private Sub Command1_Click() x = 3 If x > 10 Then y = x ^ 2 + 3 * x + 2 Else If x > 5 Then y = 3 * x + 2 Else y = 5 End If End If End Sub