求实数经的整数幂 。const maxn=100;var n,j,k:longint; x,y:extended; a:array[1..maxn] of integer;begin readln(x,n); k:=0; while n<>0 do begin _______ ①_________ ; a[k]:=n mod 2; n:=n div 2; end; __________②________; for j:=k downto 1 do begin y:= __________ ③____________ if__________ ④_________ then y:=y*x; end; writeln(y)end.[8分]
求实数经的整数幂 。const maxn=100;var n,j,k:longint; x,y:extended; a:array[1..maxn] of integer;begin readln(x,n); k:=0; while n<>0 do begin _______ ①_________ ; a[k]:=n mod 2; n:=n div 2; end; __________②________; for j:=k downto 1 do begin y:= __________ ③____________ if__________ ④_________ then y:=y*x; end; writeln(y)end.[8分]
分析程序结果 #include <stdio.h> #define MAXN 20 int p(int k,int a[]) { int m,i,c=0; for(m=2;m<=k;m++){ for(i=2;i<=m;i++) if(!(m%i)) break; if(i==m) a[c++]=m; } return c; } void main() { int i,m,s[MAXN]; m=p(13,s); for(i=0;i<m;i++) printf("%4d ",s[i]); printf(" "); } 程序输出结果为();函数 int p(int k,int a[]) 的功能为()
分析程序结果 #include <stdio.h> #define MAXN 20 int p(int k,int a[]) { int m,i,c=0; for(m=2;m<=k;m++){ for(i=2;i<=m;i++) if(!(m%i)) break; if(i==m) a[c++]=m; } return c; } void main() { int i,m,s[MAXN]; m=p(13,s); for(i=0;i<m;i++) printf("%4d ",s[i]); printf(" "); } 程序输出结果为();函数 int p(int k,int a[]) 的功能为()
附加题(每小题10分,共20分)[br][/br] 1.编写一个maxn存储过程,通过输入参数传入三个整数,通过输出参数传出三个数的最大数。调用该存储过程,求6,9,2的最大值。 2.编写一个tt存储过程完成计算1+2+3+...+n,其中n通过输入参数传入,运行结果通过输出参数传出。
附加题(每小题10分,共20分)[br][/br] 1.编写一个maxn存储过程,通过输入参数传入三个整数,通过输出参数传出三个数的最大数。调用该存储过程,求6,9,2的最大值。 2.编写一个tt存储过程完成计算1+2+3+...+n,其中n通过输入参数传入,运行结果通过输出参数传出。
for i in range(b.max_row): for j in range(b.max_column): print(b.cell(row=i,column=j).value)上面语句运行的结果是:__________。 A: 1 1 1 1 1 1 1 1 1 1 B: 1111111111 C: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 D: 出现异常
for i in range(b.max_row): for j in range(b.max_column): print(b.cell(row=i,column=j).value)上面语句运行的结果是:__________。 A: 1 1 1 1 1 1 1 1 1 1 B: 1111111111 C: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 D: 出现异常
【单选题】CDMA通信的基站,假定基站A的码片序列是+1 +1 +1 -1 -1 +1 -1 -1,基站发射bit为101时,实际发射的信号是 A. +1 +1 +1 -1 -1 +1 -1 -1 +1 +1 +1 -1 -1 +1 -1 -1 –1 –1 –1 +1 +1 –1 +1 +1 B. +1 +1 +1 -1 -1 +1 -1 -1 –1 –1 –1 +1 +1 –1 +1 +1 +1 +1 +1 -1 -1 +1 -1 -1 C. +1 +1 +1 -1 -1 +1 -1 -1 +1 +1 +1 -1 -1 +1 -1 -1 +1 +1 +1 -1 -1 +1 -1 -1 D. –1 –1 –1 +1 +1 –1 +1 +1 –1 –1 –1 +1 +1 –1 +1 +1 –1 –1 –1 +1 +1 –1 +1 +1
【单选题】CDMA通信的基站,假定基站A的码片序列是+1 +1 +1 -1 -1 +1 -1 -1,基站发射bit为101时,实际发射的信号是 A. +1 +1 +1 -1 -1 +1 -1 -1 +1 +1 +1 -1 -1 +1 -1 -1 –1 –1 –1 +1 +1 –1 +1 +1 B. +1 +1 +1 -1 -1 +1 -1 -1 –1 –1 –1 +1 +1 –1 +1 +1 +1 +1 +1 -1 -1 +1 -1 -1 C. +1 +1 +1 -1 -1 +1 -1 -1 +1 +1 +1 -1 -1 +1 -1 -1 +1 +1 +1 -1 -1 +1 -1 -1 D. –1 –1 –1 +1 +1 –1 +1 +1 –1 –1 –1 +1 +1 –1 +1 +1 –1 –1 –1 +1 +1 –1 +1 +1
for i in range(1,11): for j in range(1,11): b.cell(row=i,column=j).value=1 #b是一个工作表对象for i in range(1,11): for j in range(1,11): print(b.cell(row=i,column=j).value,end=" ") print()上面程序代码运行的结果是()。 A: 1 B: 1 1 1 1 1 1 1 1 1 1 C: 1111111111 D: 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1
for i in range(1,11): for j in range(1,11): b.cell(row=i,column=j).value=1 #b是一个工作表对象for i in range(1,11): for j in range(1,11): print(b.cell(row=i,column=j).value,end=" ") print()上面程序代码运行的结果是()。 A: 1 B: 1 1 1 1 1 1 1 1 1 1 C: 1111111111 D: 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1
下列哪个码片序列不能用于CDMA通信 A: ( -1 -1 -1 +1 +1 -1 +1 +1 ) B: ( -1 -1 +1 -1 +1 +1 +1 -1 ) C: ( -1 +1 -1 +1 +1 -1 -1 -1 ) D: ( -1 +1 -1 -1 -1 -1 +1 -1 )
下列哪个码片序列不能用于CDMA通信 A: ( -1 -1 -1 +1 +1 -1 +1 +1 ) B: ( -1 -1 +1 -1 +1 +1 +1 -1 ) C: ( -1 +1 -1 +1 +1 -1 -1 -1 ) D: ( -1 +1 -1 -1 -1 -1 +1 -1 )
请仔细观察下面行列式的计算过程,如果四个等号都理解了,请选择A,否则请选择B。 | a 1 1 1 1 | |a+4 a+4 a+4 a+4 a+4| | 1 a 1 1 1 | | 1 a 1 1 1 | | 1 1 a 1 1 |= | 1 1 a 1 1 | | 1 1 1 a 1 | | 1 1 1 a 1 | | 1 1 1 1 a | | 1 1 1 1 a | | 1 1 1 1 1 | | 1 a 1 1 1 | =(a+4) | 1 1 a 1 1 | | 1 1 1 a 1 | | 1 1 1 1 a | | 1 1 1 1 1 | | 0 a–1 0 0 0 | =(a+4) | 0 0 a–1 0 0 | | 0 0 0 a–1 0 | | 0 0 0 0 a–1 | =(a+4)(a–1)^4
请仔细观察下面行列式的计算过程,如果四个等号都理解了,请选择A,否则请选择B。 | a 1 1 1 1 | |a+4 a+4 a+4 a+4 a+4| | 1 a 1 1 1 | | 1 a 1 1 1 | | 1 1 a 1 1 |= | 1 1 a 1 1 | | 1 1 1 a 1 | | 1 1 1 a 1 | | 1 1 1 1 a | | 1 1 1 1 a | | 1 1 1 1 1 | | 1 a 1 1 1 | =(a+4) | 1 1 a 1 1 | | 1 1 1 a 1 | | 1 1 1 1 a | | 1 1 1 1 1 | | 0 a–1 0 0 0 | =(a+4) | 0 0 a–1 0 0 | | 0 0 0 a–1 0 | | 0 0 0 0 a–1 | =(a+4)(a–1)^4
共有4个站进行码分多址通信。4个站的码片序列为:a:(-1 -1 -1 +1 +1 -1 +1 +1) b:(-1 -1 +1 -1 +1 +1 +1 -1) c:(-1 +1 -1 +1 +1 +1 -1 -1) d:(-1 +1 -1 -1 -1 -1 +1 -1) 现收到这样的码片序列:(-1 +1 -3 +1 -1 -3 +1 +1),则( )发送1。
共有4个站进行码分多址通信。4个站的码片序列为:a:(-1 -1 -1 +1 +1 -1 +1 +1) b:(-1 -1 +1 -1 +1 +1 +1 -1) c:(-1 +1 -1 +1 +1 +1 -1 -1) d:(-1 +1 -1 -1 -1 -1 +1 -1) 现收到这样的码片序列:(-1 +1 -3 +1 -1 -3 +1 +1),则( )发送1。
共有四个站进行CDMA通信,现收到这样的码片序列(-3 +1 -1 -1 +1 +1 +1 -3),则下列站点发送了数据1的是( ) A: (-1 -1 -1 +1 +1 -1 +1 +1) B: (-1 -1 +1 -1 +1 +1 +1 -1) C: (-1 +1 -1 +1 +1 +1 -1 -1) D: (-1 +1 -1 -1 -1 -1 +1 -1)
共有四个站进行CDMA通信,现收到这样的码片序列(-3 +1 -1 -1 +1 +1 +1 -3),则下列站点发送了数据1的是( ) A: (-1 -1 -1 +1 +1 -1 +1 +1) B: (-1 -1 +1 -1 +1 +1 +1 -1) C: (-1 +1 -1 +1 +1 +1 -1 -1) D: (-1 +1 -1 -1 -1 -1 +1 -1)