M: What's the number? I'll find out if it's available for immediate occupancy.
What are the man and woman doing?
A.Preparing for bed.
B.Walking toward the campus.
C.Looking for a place to live in.
D.Inviting some friends to visit.
第1题
A.5
B.1
C.25
D.4
第2题
第3题
请补充函数proc,该函数的功能是计算下面公式SN的值:
SN=1+1/3十4/5+...+2N-1/SN-1
例如,当N=20时,SN=29.031674。
注意:部分源程序给出如下。
请勿改动main函数和其他函数中的任何内容,仅在函数proc的横线上填入所编写的若干表达式或语句。
试题程序:
include<stdlib.h>
include<conio.h>
include<stdio.h>
double proc(int n)
{
double s=1.0,sl=0.0;
int k;
for(【1】;k<=n;k++)
{
s1=S;
【2】
}
return【3】;
}
void main
{
int k=0:
double sum;
system("CLS");
printf("\nPlease input N=");
scanf("%d",&k);
sum=proc(k);
printf("\nS=%If",sum);
}
第4题
有以下程序 int b=2; int func(int*A) { b+=*a;return(B) ; } main() { int a=2,res=2; res+=rune(&A) ; printf("%d \n",res); } 程序运行后的输出结果是()
A.4
B.6
C.8
D.10
第5题
有以下程序#include main(){ int num=0; while(num <=2) { num++; printf("%d\n",num); }}上面程序的输出结果是
第6题
有以下程序 #include<stdio.h> int fun(int x;int y) { if(x=y)reurn(x); else return((x+y)/2); } main() { int a=4,b=5,c=6; printf("%d\n",fun(2*a,fun(b,c))); } 程序运行后的输出结果是______。
A.3
B.6
C.8
D.12
第7题
有以下程序 #include<stdio.h> int fun(int x;int y) { if(x=y)reurn(x); else return((x+y)/2); } main() { int a=4,b=5,c=6; printf("%d\n",fun(2*a,fun(b,c))); } 程序运行后的输出结果是______。
A.3
B.6
C.8
D.12
第8题
有以下程序: int a=2; int f(int *a) {return (*a)++;) main() { int s=0; { int a=5; s+=f(&a); } s+=f(&a); printf("%d\n',s); } 执行后输出结果是()。
A.10
B.9
C.7
D.8
第9题
有以下程序: #include <stdio.h> int a=2; int f(int *a) { return (*a) ++;} main() { int s=0; { int a=5; s+=f(&a); } s+=f(&a); printf("%d\n",s) } 执行后的输出结果是()。
A.10
B.9
C.7
D.8
第10题
有以下程序 int a=2; int f(int *a) {return (*a)++; } main () int s=0; { int a=5; s+=f (&a); } s+=f (&a); printf ("%d\n",s ); 执行后输出结果是
A.10
B.9
C.7
D.8
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!