int x = 1, y =6; while (y--) { x++; } System.out.println(“x =” + x + “y =” +y); What is the result?()
![](/upload/20220827/c85071da6ff0aadc10ebce6c25bb4f0d.png)
相似题目
-
int x=0; int y 10; do { y--; ++x; } while (x < 5); System.out.print(x + “,“ + y); What is the result?()
-
public class WhileFoo { public static void main (String []args) { int x= 1, y = 6; while (y--) {x--;} system.out.printIn(“x=” + x “y =” + y); } } What is the result?()
-
public class WhileFoo { public static void main (String args) { int x= 1, y = 6; while (y--) {x--;} system.out.printIn(“x=” + x “y =” + y); } } What is the result?()
-
int x=0; int y=10; do{l3.y--; ++x; }while(x<5); System.out.print(x+","+y); What is the result?()
-
下列语句执行后y的值为:() int x=0,y=0;while(x<10){y+=(x+=2);}
-
下列程序段执行以后,内存变量Y的值是( )。 CLEARx=12345y=ODO WHILE x>0y=y+x%10x=int(x/l0)ENDDo?Y
-
执行以下程序后,y的值是() main() { int a[]={2,4,6,8,10}; int y=1,x,*p; p=&a[1]; for(x=0;x<3;x++) y + = * (p + x); printf(""%d\n"",y); }
-
下面函数int fun1(char*x){ char *y=x;while(*y++);return(y-x-1);}的功能是( )
-
int x=0,y=0;while(x<15)y++,x+=++y;cout<
-
下列程序的输出结果是()。 void f(int*x,int*y) {int t; t=*x,*x=*y;*y=t; } main() {int a[8]={1,2,3,4,5,6,7,8},i,*p,*q; p=a;q=&a[7]; while(p<q) {f(p,q);p++;q--;} for(i=0;i<8;i+)printf("%d,",a[i]); }
-
有以下程序 main() { int x=0,y=5,z=3; while(z-->0&&++x<5)y=y-1; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是
-
设以下变量均为int类型,则值不等于7的表达式是()。A.(x=y=6,x+ y,x+1)B.(x=y=6,x +y,y+1)C.(x=6,x
-
有如下代码:int x=2,y=10;while(x++<--y){},循环执行的次数是()。
-
4、以下循环体将被执行()次 int x=5,y =20; do{ y-=x; x+=2; } while(x<y);
-
下列程序的运行结果是()。 main() { int x=1,y=3,a=0; while(x++!=(y-=1)) { a+=1; if(y<x)break; } printf("%d,%d,%d\n",x,y,a); }
-
下述函数功能是 ______。int funr(char*x){char*y=x;while(*y++);return y-x-1;}A.求字符串的长度
-
publicclassWhileFoo{publicstaticvoidmain(Stringargs){intx=1,y=6;while(y--){x--;}system.out.printIn(x=”+xy=”+y);}}Whatistheresult?()
-
下列程序段执行以后,内存变量y的值是()。x=34567y=0DO WHILE x>0 y=x%10+y*10 X=int(x/10)ENDDO
-
根据变量定义“static int x[5],y[2][3]={9,6,3,1,4,7};”,x[4]=【】,y[1][2]=【】。
-
下列程序段执行以后,内存变量y的值是()。 x=34567 y=0 DO WHILE x>0 y=x%10+y*10 x=int(x/1
-
以下程序执行后的输出结果是()。main(){int x = 1,y = 1;while(y<=5){if(x>=10)break;if(x%2==0){x+=5;continue;}x-=3;y++;}printf(“%d,%d”,x,y);}
-
下列循环体执行的次数是()。int y=2, x=4;while(&8211;x != x/y){ }
-
下面程序段执行后的输出结果是()。using System;class test{ static void Main(){ int x = 0, y = 5, z = 3; while (z– > 0 && ++x < 5) y = y – 1; Console.WriteLine(“{0},{1},{2}”, x, y, z); }}
-
有以下程序: include main { int x=4,y; do { y=x; if(!y)printf("x"); else printf("y"): x--; }while(x); } 程序的输出结果是()。
推荐题目
- 甲携带一把管制刀具,进入公共广场内参加示威活动,对甲的认定正确的是()。
- 滥用代理权的禁止
- 城市轨道交通,是当代城市中地铁、轻轨()的总称。
- 与使用浏览器下载资源相比较,使用下载工具软件进行资源下载有许多优点,下列选项中哪项不属于其优点?()
- 国有土地使用权出让的方式包括()。
- 病毒包涵体是诊断病毒性肺炎的重要依据。()
- 甲公司投标中标承包了一个高档住宅小区的施工任务,由于工期紧,将其中3幢住宅楼的施工任务转让给了乙、丙、丁3家公司,转让合同金额共2600万元。对此,按照《招标投标法》的规定,甲公司将会面临的法律后果不包括()。
- 企业从应付职工薪酬中扣还的个人所得税,应贷记()账户。
- 机械制造企业季节性生产和其它计划性或非计划性检修停工期间,生产部门发生的费用在生产费用中按相应成本费用项目正常归集,当期有生产的,转入当期产品生产成本,当期没有生产的,直接转入当期主营业务成本()
- 10、有节奏流水分为()。