判断题 不动产登记费按照不动产的面积、体积或者价款的比例收取。( )
问答题 请编一个函数fun(oh lr*str),该函数的功能是把字符串中的内容逆置。 例如,字符串中原有的字符串为asdf9,则调用该函数后,串中的内容为9fdsa。 请勿改动main()函数和其他函数中的任何内容,仅在函数proc()的花括号中填人所编写的若干语句。 试题程序: #include<string.h> #include<conio.h> #include<stdio.h> #define N 100 void fun(char * str) {} void main() { char a[N]; FILE*out: printf("Enter a string:"); gets(a); printf("The origir al string is:"); puts(a); fun(a): printf("The string after modified:"); puts(a); strcpy(a,"Welcome!"); fun(a); out=fopen("outfile.dat","w"); fprintf(out,"%s".a); fclose(out); }
问答题 请编写fun()函数,其功能是:计算并输出3~m所有素数的平方根之和。 例如,若主函数从键盘给m输入50后,则输出为s= 68.665791。 请勿改动main()函数与其他函数中的任何内容,仅在函数fun()的花括号中填入所编写的若干语句。 注意:m的值要大于2但不大于100。部分源程序给出如下。 试题程序: #include<math.h> #include<stdio.h> double fun(int m) {} void main() { int m; double s; FILE*out: printf("\n\nInput m:"); scanf("%d",&m); s=fun(m); printf("\n\ns=%f\n\n",s); out=fopen("outfile.dat","w"); for(m=0;m<10;m++) fprintf(out,"%f\n",fun(m+80)); felose(out); }