设x=2.5,a=7,y=4.7,则x+a%3×(int)(x+y)%2/4为()。
设x=2.5,a=7,y=4.7,则x+a%3×(int)(x+y)%2/4为()。
相关考题:
以下程序的输出结果是#includevoid main(){ int x=1,y=3;cout {int x=0;x+=y*2;cout }cout }A. 1,6,3,1,3B.1,6,3,6,3C.1,6,3,2,3D.1,7,3,2,3
若有定义:int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是A.2.500000B.2.750000C.3.500000D.0.000000
以下程序的输出结果是main(){ int x=1,y=3;printf("%d,",x++);{ int x=0;x+=y*2;printf("%d,%d, ",x,y);}printf("%d,%d\n",x,y);}A.1,6,3,1,3B.1,6,3,6,3C.1,6,3,2,3D.1,7,3,2,3
以下程序段的执行结果为【】。includedefine PLUS(x, y) x+ yvoid main() { int x=1, y 以下程序段的执行结果为【 】。include<iostream.h>define PLUS(x, y) x+ yvoid main(){int x=1, y=2,z=3,sum;sum=PLUS(x+ y, z)*PLUS(y, z);cout<<"SUM="<<sum;cout<<end1;}
设x和y均为int型变量,则执行下面的循环后,y值为( )。 public class Sun { public static void main(String args[ ]) { int x, y; for (y=1, x=1; y<=50; y++) { if(x>=10) break; if (x%2==1) { x+=5; continue; } x-=3; } System.out.println (y); } }A.2B.4C.6D.8
若有定义:inta=7;floatx=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是()。A.2.500000B.2.7500OOC.3.500000D.0.000000
以下程序的输出结果是 include void main( ) {int x=1,y=3; cout 以下程序的输出结果是#include<iostream.h>void main( ){int x=1,y=3;cout < < x++ < < ",";{int x=0;x+=y * 2;cout < < x < <"," < < y < <",";}cout < < x < < "," < < y;}A.1,6,3,1,3B.1,6,3,6,3C.1,6,3,2,3D.1,7,3,2,3
设x和y均为int型变量,则执行下面的循环后,y值为()。include void main(){int x, y;f 设x和y均为int型变量,则执行下面的循环后,y值为( )。#include <iostream.h>void main(){int x, y;for(y= 1,x= 1 ;y<=50;y++){ if(x>=10) }break;if (x%2==1){ x+=5; continue;} x-=3;} cout<<y;A.2B.4C.6D.8
设以下变量均为int类型,则值不等于7的表达式是( )。A.(x=y=6,x+ y,x+1)B.(x=y=6,x +y,y+1)C.(x=6,x+1,y=6,x +y)D.(y=6,y+1,x=y,x+1)
下述程序段的输出结果是 ( ) int x=10; int y=x+ +; printf("%d,%d",(x+ +,y),y+ +);A.11,10,B.11,11C.10,10D.10,11
设x和y为int型变量,则执行下面的循环后,y的值为( ) for(y=l, x=l; y=50; x==10) break; if(x%2==1){ x+=5; continue;} X -= 3; }A.2B.4C.6D.8
若有程序fun(int a, int b){ static int c=0; c+=a+ b; returm c;}main(){ int x=5,y=3,z=7,r; r=fun((y, x+ y),z); r=fun (x, y); printf("%d\n", r);}A.23B.15C.19D.18
main( ){ int x=31,y=2,s=0;do{ s-=x*y;x+=2;y-=3;} while( x%3==0);printf(“x=%d\ty=%d\ts=%d\n”,x,y,s);}
填空题若x和y均为int类型的变量,则依次执行语句x+=y;y=x-y;x-=y;的效果是()。(用文字描述)