2013年c语言期末考试试题及答案,2013年c语言末考试题.doc

阅读: 评论:0

2013年c语言期末考试试题及答案,2013年c语言末考试题.doc

2013年c语言期末考试试题及答案,2013年c语言末考试题.doc

2013年c语言末考试题,c语言期末考试试题,c语言期末考试题库,c语言期末考试,大一c语言期末考试,北航c语言期末考试,大一c语言期末试题,c语言期末试题,c语言期末试题及答案,c语言二级考试真题

1、给定n个数据, 求最小值出现的位置(如果最小值

出现多次,求出第一次出现的位置即可)。

f2=f3;

s=s=f2/f1;}

return s;

83功能:从键盘上输入任意实数,求出其所对应的函数值。

z=e的x次幂(x>10)

z=log(x+3) (x>-3)

z=sin(x)/((cos(x)+4)

答案:double z;

If(x>10)z=log(x+3)

else if(x > -3)z=log(x+3);

else z=sin(x)/(cos(x)+4);

return(z);

84题目:用函数求一个N阶方阵右下三角元素的和(包括副

对角线上的元素)。

int I,j,k=0;

for(i=0;i

for(j=N-1-I;j

k=k+a[i][j];

return(k);

85功能:用函数实现字符串的复制, 不允许用strcpy()函数。

int i;

for(i=0;str1[i]!=’’;i++)

str2[i]=str1[i];

str2[i]=’’

86功能:将字符串中的小写字母转换为对应的大写字母,

其它字符不变。

inti;

for(i=0;str[i]!=’’;i++)

if(str[i]>=’a’&&str[i]<=’z’)

str[i]=str[i]-32

87功能:编写函数fun其功能是:根据整型形参m,计算如下

公式的值:y=1/2!+1/4!+...+1/m!(m是偶数)

int I,j;

double s=1;

for(i=2;i<=m;i+=2)

{for(j=i-1;j<=I;j++)

s=s*j;

y=y+1.0/s;

} return y ;

88功能:能计算从1开始到n的自然数中偶数的平方的和,n由

键盘输入,并在main()函数中输出。(n是偶数)

int sum,I;

sum=0;

for(i=2;i<=n;i=i+2)

{ sum=sum+i*I;}

return(sum)

89功能:根据整型形参m,计算如下公式的值:

y=1/5+1/6+1/7+1/8+1/9++1/(m+5)

例如:若m=9,则应输出:1.168229

double y=0;

int I;

for(i=0;i<=m;i++)

{y+=1.0/(i+5);}

Return(y);

90功能:编写函数fun求一个字符串的长度,在main函数中

输入字符串,并输出其长度。

char *p;

int n=0;

p=p1;

while(*p++)

n++;

return n;

relationship between Government and business. The "two sessions", General Secretary of "Pro", "clear" the word succinctly summarized the new relationship between Government and business, as pure politics, reshaping the political relationship specified in the direction. District leaders in handling political and business relations, engage in trading power for money, and finally stumbled, we a lesson, always keep in mind that "Pro", "clean" practicing "Pro", "clear". "Pro" is to open a sincere engagement with private enterprise to help solve practical difficulties; " Clear "is to clarify the Division of power, exercised in accordance with, private entrepreneurs with innocent purity, not abusing power for personal gain, not to engage in trading power for money. Third, in order to maintain fairn

本文发布于:2024-02-04 22:54:34,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170718237660475.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

上一篇:都是ß惹的祸
下一篇:C语言杂谈01
标签:语言   考试题   期末考试   试题   答案
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23