A.优秀
B.良好
C.通过
D.不通过
E.不确定,随机
第1题
Function SR(x As Double) As Double
Select Case Sgn(x)
Case 1
SR=Sqr(x)
Exit Function
Case 0
SR=0
Case -1
SR=-1
End Select
End Function
Private Sub Command1_Click()
Dim Msg, SRN
Dim N As Double
N=InputBox("请输入要计算平方根的数")
Msg=N & "的平方根"
Select Case SR(N)
Case 0
Msg=Msg & "是0"
Case -1
Msg=Msg & "是一个虚数"
Case Else
Msg=Msg & "是" & SR(N)
End Select
MsgBox Msg
End Sub
程序运行后,单击命令按钮,在输入对话框内输入-1,输出结果是 【15】 。
第3题
#include
int MaxValue(int x, int y)
{
return x>y? x:y;
}
int MinValue(int x,int y)
{
return x>y? y:x;
}
int main()
{
int a=4,b=3,c=5,d,e,f;
d=MaxValue(a,b);
d=MaxValue(d,c);
e=MinValue(a,b);
e=MinValue(e,c);
f=a+b+c-d-e;
printf("%d,%d,%d\n",d,f,e);
return 0;
}
A.5,4,3
B.3,5,4
C.3,4,5
D.5,3,4
第4题
A.4,3,7
B.3,4,7
C.5,2,7
D.2,5,7
第5题
A.7
B.6
C.5
D.4
第6题
#include
void main(){
int
x=48,y=30,Z;
do{z=x%y;x=y;y=z;}while(y>0);
for(i=1;i<=5;i++)s+=i*|;
printf("x=%d/n",x)
}
第7题
x = 3 : y = 5 : z = 9
x = x + y
y = x - y
If x - y >z - x Then z = x + y
If x + y >z - y Then x = z + y
Print x, y, z
A、 3 5 9
B、 14 3 11
C、 8 3 11
D、 8 5 9
第8题
第9题
第10题
include<iostream.h>
intx=5;
intfun(inta)
{
intc:
c=X*a:
returnC;
}
voidmain()
{
intx=3,a=4;
x=x+fun(a);
cout<<"x="<<x<<endl;
}
A.x=15
B.x=17
C.x=23
D.x=25
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!