首页/ 题库 / [单选题]下列程序段执行后的输出结果为 int x的答案

下列程序段执行后的输出结果为 int x=3; int y=10; System.out. println(y %x) ;

单选题
2022-01-01 00:17
B、1
C、2
D、3
查看答案

正确答案
B

试题解析
解析:算术运算符“%”是取余数,a %b是求a除以b所得的余数。10%3的余数是1。

标签:
感兴趣题目
有以下程序 float fun(int x,int y) {return(x+y);} main() { int a=2,b=5,c=8; printf(“%3.Of ”,fun((int)fun(a+c,b),a-c)); } 程序运行后的输出结果是
有如下程序 float fun (int x,int y){return(x+y);} main() { int a=2,b=5,c=8; printf("%3.Of ",fun((int)fun(a+c,B) ,(a-C) )) } 程序运行后的输出结果为_______。
有以下程序: float fun(int x,int y) {return(x+y);} main() { int a=2,b=5,C=8; printf("%3.0f ",fun((int)fun(a+c,b),a-c)); } 程序运行后的输出结果是( )。
有以下程序: float fun(int x,int y) {return(x+y);} main( ) { int a=2,b=5,c=8; printf("%3.Of ",fun( (int)fun(a+c,b),a-c) ); } 程序运行后的输出结果是
执行下列程序后的输出结果是______。main(){ int y=10; do {y--;}while(--y); printf("%d ",y--);}
有以下程序: main() { int y=10; while(y--); printf("y=%d ",y); } 程序执行后的输出结果是( )。
有以下程序 main() {int y=10; while(y-);printf("y=%d ",y); } 程序执行后的输出结果是______。
有以下程序: main() {int y=10; while(y--);printf("y=%d ",y); } 程序执行后的输出结果是( )。
程序段:int x=12;double y=3.141593;printf(%d%8.6f,x,y);输出结果是(  )。
执行以下语句后的输出结果是______。int x=10,y=3,z;printf("%d ",z=(x%y,x/y));
以下程序执行后的输出结果是( )。 #include <iostream> using namespace std; void try(int,int,int,int); int main ( ) { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = X*X; y = y*y; r = z+x+y; }
以下程序执行后的输出结果是 #include<iostream> using namcspace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }
相关题目
若有以下程序段int x=20则执行以上语句后的输出结果是()
以下代码段执行后的输出结果为( )int  x =-3;int  y =-10;Systemoutprintln(y%x);
下列程序段执行后的输出结果为( )。 int x=3; int y=10; System.out.println(y%x);
下列程序段执行后的输出结果为 int x=3; int y=10; System.out. println(y %x) ;
以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }
以下程序执行后的输出结果是( )。 #include<iostream> using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y, int z,int r) { z = x+y; X = x*x; y = y*y; r = z+x+y; }
有以下程序 int fun(int x,int y){return(x+y);} main { int a=1,b=2,C=3,sum; sum=fun((a++,b++,a+b),c++ printf("%d\n",sum);) 执行后的输出结果是( )。
有以下程序: void f(int y,int *x) { y=y+ *x; *x;=*x+y;} main() { int x=2,y=4; f(y,&x); - printf ("%d %d ",x,y); } 执行后的输出结果是 ______。
执行如下语句之后,输出的结果是 ( )public class ex1{ public static void main(String[]args){ int x=5,y=3, x+=x--*--y System.out.println(x); }}
执行如下语句之后,输出的结果是______。 public class ex24 { public static void main(String[] args) { int x=5,y=3; x+=X-- *--y; System.out.println{x); } }
下面程序段的输出结果为 package test; public class Class A { int x=20; static int y=6; public static void main(String args[]) { Class B b=new Class B(); b.go(10); System.out.println("x"+b.x); } } class ClassB { int x; void go(int y) { ClassA a=new ClassA(); x=a.y; } }
下列程序段: Int x=10,y=8; boolean b=true; System.out.println(x>0&&x<y||b); 的结果为 ( )
下列语句输出结果为( )。 public class test { public static void main (String args[]) { int x=10,y=9; boolean b=true; System.out.println(x<y||!b); } }
下列语句输出结果为( )。 public class test { public static void main(String args[ ]) { int x=10,y=8; boolean b=true; System.out.println(x>0&&x<y||b); } }
下面程序段的输出结果为 package test; public class ClassA { int x=20; static int y=6; public static void main(String args[]) { ClassB b=new ClassB(); b.go(10); System.out.println("x="+b.x); } } class ClassB { int x; void go(int y) { ClassA a=new ClassA(); x=a.y; } }
有如下程序段:int x=3,do{ x-=2;cout<<x;}while(!(--x));执行这个程序段的输出结果是( )。
写出下列程序段的输出结果( )。main(){int x=5; int y=10;printf("%d\n",x++); printf("%d\n",++y); }A.5 B.6 C.6 D.5 10 10 11 11
有以下程序 float fun(int x,int y) { return(x+y);} main() { int a=2,b=5,c=8; printf("%3.0f ",fun((int)fun(a+c,b),a-c));} 程序运行后的输出结果是
有以下程序 float fun(int x,int y) { return(x+y); } main() { int a=2,b=5,c=8; printf("%3.0f ",fun((int)fun(a+c,B) ,a-C) ); } 程序运行后的输出结果是( )
有以下程序 float fun(int x, int y){ return{x+ y); }main(){ int a=2,b=5,c=8; printf("%3.of ",fun((int)fun(a+ c, B) ,a-C) );} 程序运行后的输出结果是
广告位招租WX:84302438

免费的网站请分享给朋友吧