已知:int x=7,y=5;x/y的值为()。A、1B、7C、0D、2
已知:int x=7,y=5;x/y的值为()。
- A、1
- B、7
- C、0
- D、2
相关考题:
已知x=5,y=2,z=6。表达式x>y And z>x Or xy的值是()。A.FalseB.TrueC.1D.0 已知x=5,y=2,z=6。表达式x>y And z>x Or x<y And Not z>y的值是( )。A.FalseB.TrueC.1D.0
有以下程序: int f1(int x, int y){ return x>y? x:y; } int f2(int x, int y){ return x>y? y:x; } main() { int a=4, b=3, c=5, d=2, e, f, g; e=f2(f1(a, b), f1(c, d)); f=f1(f2(a, b) , f2(c, d)); g=a+b+c+d-e-f; printf("% d, %d, %d\n", e, f, g); } 程序运行后的输出结果是______。A.4, 3, 7B.3, 4, 7C.5, 2, 7D.2, 5, 7
设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
请选出以下程序的输出结果()includesub(x,y,z)int x,y,*z;{ *2=y-x;}main(){ int a,b, 请选出以下程序的输出结果( ) #include<stdio.h> sub(x,y,z) int x,y,*z; { *2=y-x;} main() { int a,b,c; sub(10,5,A) ;sub(7,a,B) ;sub(a,b,C) ; printf("%d,%d,%d\n",a,b,C) ; }A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7
请选出以下程序的输出结果_______。includesub(x,y,z)int x,y,*z;{*z=y-x;}main(){int 请选出以下程序的输出结果_______。 #include<stdio.h> sub(x,y,z) int x,y,*z; {*z=y-x;} main(){ int a,b,c; sub(10,5,A) ;sub(7,a,B) ;sub(a,b,C) ; printf("%d,%d,%d\n",a,b,C) ; }A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7
设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
请选出以下程序的输出结果 ______。include sub(x, y, z)int x, y,*z;{*z=y-x:}main() 请选出以下程序的输出结果 ______。#include <stdio. h>sub(x, y, z)int x, y,*z;{*z=y-x:}main(){ int a, b, c; sub 10,5,a);sub(7,a,b);sub(a, b, c); printf("%d,% d,/%d\n", a, b, c);}A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7
Less Test{ public static void main(String[] args){ for(int x=0;x7;++x){ int y=2; x=++y; } System.out.println(“y=”+y); } } 结果为:() A、y=5B、y=6C、 y=7D、y=8E、编译失败F、运行时异常被抛出
在Visual Basic中,若x、y都是正整数,且x能被y整除,则下列表达式值一定为真的是()。A、x/y=0B、Abs(x/y)=x/yC、Int(x/y)=0D、Int(x/y)=x/y
Which two code fragments are most likely to cause a StackOverflowError?()A、int []x = {1,2,3,4,5};for(int y = 0; y 6; y++) System.out.println(x[y]);B、static int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }C、for(int y = 10; y 10; y++)doStuff(y);D、void doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }E、for(int x = 0; x 1000000000; x++) doStuff(x);F、void counter(int i) { counter(++i); }
多选题Which two code fragments are most likely to cause a StackOverflowError?()Aint []x = {1,2,3,4,5};for(int y = 0; y 6; y++) System.out.println(x[y]);Bstatic int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }Cfor(int y = 10; y 10; y++)doStuff(y);Dvoid doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }Efor(int x = 0; x 1000000000; x++) doStuff(x);Fvoid counter(int i) { counter(++i); }
单选题已知:int x=10,y=4;x/y的值为()A2B2.0C2.5D0