网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

阅读下面的程序; Function Func(x As Integer,y As Integer)As Integer Dim n As Integer Do While n < = 4 x=x + y n = n + 1 Loop Func=x End Function Private Sub Command1_Click() Dim x As Integet, y As Integer Dim n As Integer,z As Integer x=1 y=1 For n = 1 To 6 z=Func(x,y) Next n Print z End Sub 程序运行后,单击命令按钮,输出的结果为.

A.16

B.21

C.26

D.31


参考答案

更多 “ 阅读下面的程序; Function Func(x As Integer,y As Integer)As Integer Dim n As Integer Do While n < = 4 x=x + y n = n + 1 Loop Func=x End Function Private Sub Command1_Click() Dim x As Integet, y As Integer Dim n As Integer,z As Integer x=1 y=1 For n = 1 To 6 z=Func(x,y) Next n Print z End Sub 程序运行后,单击命令按钮,输出的结果为.A.16B.21C.26D.31 ” 相关考题
考题 program exam(output); var x,y,x:integer; proedure silly(x:integer;vary:integer); begin x:=5;y:=6;z:=3; writeln(x,y,z) end; begin x:=1;y:=2;z:=3; silly(x,y); writeln(x,y,z) end. 以上程序运行结果为(). A567 563B567 567C567 167D567 163

考题 下列程序中,实现将封装数据类型Integer和基本数据类型int之间的转换,以及Integer,int类型和String类型之间的转换。请将程序补充完整。程序运行结果如下:123456456public class ex7_1{public static void main(String[]args) {Integer intObj;int n;String s;intObj = new Integer(123);n=intObj.__________;System.out.printin(Integer.toString(n));s=new String("456");intObj=Integer._________;System.out.println(intObj.__________);n=Integer.parseInt(s);System.out.println(Integer.toString(n));}}

考题 如果Add函数的调用代码为:func main() {var a Integer = 1var b Integer = 2var i interface{} = asum := i.(Integer).Add(b)fmt.Println(sum)}则Add函数定义正确的是() A.type Integer intfunc (a Integer) Add(b Integer) Integer { return a + b}B.type Integer intfunc (a Integer) Add(b *Integer) Integer { return a + *b}C.type Integer intfunc (a *Integer) Add(b Integer) Integer { return *a + b}D.type Integer intfunc (a *Integer) Add(b *Integer) Integer { return *a + *b}

考题 下列程序的运行结果为______。 #define MS DOS #ifdef MS DOS #define INTEGER SIZE 32 #else #define INTEGER SIZE 16 #endif main () { printf ("integer_size=%d\n", INTEGER_SIZE); }A.integersize=32B.integer_size=16C.integersize=32,integer_size=16D.错误

考题 排列的生成:(1..n)procedure solve(dep:integer);vari:integer;

考题 定义一个List对象list,使用ArrayList的构造方法进行初始化,并且要求list中必须全部存放Integer类型的对象,以下语句正确的是()。A.List list = new ArrayList<Integer>();B.List list = new ArrayList ();C.List<Integer> list = new ArrayList<Integer>();D.ArrayList<Integer> list = new List<Integer>();

考题 定义一个List对象list,使用ArrayList的构造方法进行初始化,并且要求list中必须全部存放Integer类型的对象,以下语句正确的是()。A.List list = new ArrayList ();B.List list = new ArrayList<Integer>();C.ArrayList<Integer> list = new List<Integer>();D.List<Integer> list = new ArrayList<Integer>();

考题 8、下面哪些是将分数化为浮点数的正确定义?A.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = a/b###SXB###B.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = (fromInteger a)/ (fromInteger b)###SXB###C.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = fromInteger (a/b)###SXB###D.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = (fromIntegral a)/ (fromIntegral b)###SXB###E.ty

考题 定义一个List对象list,使用ArrayList的构造方法进行初始化,并且要求list中必须全部存放Integer类型的对象,以下语句正确的是()。A.List list = new ArrayList ();B.List list = new ArrayList<Integer>();C.List<Integer> list = new ArrayList<Integer>();D.ArrayList<Integer> list = new List<Integer>();

考题 11、下面哪些定义是类型正确的?A.f :: (Integer, Integer) - Float f (x,y) = x / yB.f :: (Integer, Integer) - Float f (x,y) = (fromInteger x) / (fromInteger y)C.f :: (Integer, Integer) - Float f (x,y) = 3*x + yD.f :: (Integer, Integer) - Integer f (x, y) = 3*x + y