网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
We found()fun()with these children.

A、it...to play

B、this...played

C、that...playing

D、what...play


参考答案

更多 “ We found()fun()with these children. A、it...to playB、this...playedC、that...playingD、what...play ” 相关考题
考题 下列给定程序中,函数fun()的功能是:在字符串的最前端加入n个*号,形成新串,并且覆盖原串。注意:字符串的长度最长允许79。请改正函数fun()中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序;include <stdio.h>include <strzng.h>include <conio.h>/*****************found***************/void fun(char s[], int n){char a[80],*p;int i;/*****************found***************/s=p;for(i=0; i<n; i++) a[i]='*';do{a[i]=*p;/*****************found***************/i++;}while(*p);a[i]=0;strcpy(s,a);}main(){ int n;char s[80];clrscr();printf("\nEnter a string:");gets(s);printf("\nThe string\%s\n",s);printf("\nEnter n(number of*):");scanf ("%d",n);fun(s,n);printf("\nThe string after inster: \%s\n",s);}

考题 下列给定程序中,函数fun()的功能是:在字符串str中找出ASCII码值最大的字符,将其放在第一个位置上,并将该字符前的原字符向后顺序移动。例如,调用fun()函数之前给字符串输入ABCDeFGH,调用后字符串中的内容为 eABCDFGH。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include<stdio.h>/***************found************/fun(char *p){ char max, *q;int i=0;max=p[i];while (p[i]!=0){if (max<p[i]){/***************found************/p = q +i;max=p[i];}i++;}/***************found************/while (q<p){*q=*(q-1);q--;}p[0]=max;}main(){ char str[80];printf("Enter a string: "); gets(str);printf("\nThe original string: ");puts(str);fun(str);printf("\nThe string after moving: ");puts(str); printf("\n\n");}

考题 下列给定程序中,函数fun()的功能是::求k!(k<13),所有阶乘的值作为函数值返回。例如:若k=10,则应输出3628800。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <conio.h>include <stdio.h>long fun(int k){/*************found**************/if k>0return (k* fun (k-l));/*************found**************/else if (k=0)return 1;}main ( ){int k=10;clrscr ();print, ("%d!=%1d\n ", k, fun (k));}

考题 下列给定程序中,函数fun()的功能是:计算整数n的阶乘。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <stdio.h>double fun(int n){double result=l.0;whil (n>ln<170)/**************found********************/result*=--n;/**************found********************/return;main(){int. n;clrscr();printf("Enter an integer: ");scanf("%d",n);printf("\n\n%d!=%lg\n\n ",n, fun(n));}

考题 下列给定程序中,函数fun()的功能是:根据整型参数m,计算如下公式的值。y=1/(100×100)+1/(200×200)+1/(300×300)+…+1/(m×m)例如,若m=2000,则应输出0.000160。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <conio.h>include <stdio. h>/*************found**************/fun (int m){ double y=0, d;int i;/*************found**************/for (i=100, i<=m, i+=100){d= (double) i* (double) i;y+=l. 0/d;}return (y);}main ( ){ int n=2000;clrscr();printf("\nThe result is %lf\n",fun(n));

考题 使用VC6打开考生文件夹下的工程test12_1,此工程包含一个源程序文件test_12.cpp,但该程序运行有问题,请改正程序中的错误,使该程序的输出结果如下:fun (Sample p) 1 2fun (Sample *p) 3 420 10源程序文件test12_1清单如下:include<iostream .h>class Sample{private:int x,y;static int z;public:Sample(int a,int b){ x=a;y=b; }void fun(Sample p);void fun(Sample *p);static void print(Sample s);};/*************** found ***************/int z=10;void Sample::fun(Sample p){x=p.K;y=p.y;cout<<"fun(Sample p)"<<" "<<x<<" "<<y<<endl;}void Sample::fun(Sample *p){/************** found **************/x=p.x; y=p.y;cout<<"fun(Sample *p) "<<" '<<x<<" "<<y<<endl;}void Sample::print (Sample s){/*************** found *****************/x=20;cout<<s. x<<" "<<z<<endl;}void main(){Sample p(1,2),q(3,4);p. fun(p);p. fun(q);p. print(p);}

考题 下列给定程序中,函数fun()的功能是:判断一个整数m是否是素数,若是返回l,否则返回0。在main()函数中,若fun()返回1则输出YES,若fun()返回0则输出NO!请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构.试题程序:include <conio.h>include <stdio.h>int fun(int m){ int k=2;while (k<=m&&(m%k))/*************found*********************/k++/*************found*********************/if(m=k)return 1;else return O;}main ( ){ iht n;clrscr ();printf("\nPlease enter n: ");scanf ("%d", n);if (fun (n)) printf ("YES\n");else printf ("NO! \n");}

考题 下列给定程序中,函数fun()的功能是:根据整型形参m的值,计算如下公式的值。t=1-1/(2×2)-1/(3×3)-…-l/(m×m)请改正函数fun()中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <conio.h>include <stdio.h>double fun(int m){ double y=1.O;int i;/*************found**************/for(i=2;i<m;i++)/************found**************/y-=1/ (i*i);return(y);}main(){ int n=5;clrscr();printf("\nThe result is %1f\n", fun(n));}

考题 下列给定程序中,函数fun()的功能是:应用递归算法求某数a的平方根。求平方根的迭代公式如下:例如,2的平方根为1.414214。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <math. h>include <stdio. h>/*************found**************/fun(double a,double x0){ double xl,y;xl= (x0+a/x0)/2.0;/*************found**************/if (fabs (xl-x0) >0.00001)y=fun (a, xl);else y=x1;return y;}main ( ){ double x;printf("Enter x: "); scanf("%1f",x);printf ("The square root of %1f is %1f\n",x, fun(x,l.O));}

考题 下列给定程序中,函数fun的功能是按以下递归公式求函数值。例如:当给n输入5时,函数值为240;当给n输入3时,函数值为60。请改正程序中的错误,使它能得到正确结果。注意;不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <stdio.h>/*************found****+*******/fun(int n);{int c;/*************found********+*****/if(n=1)c=15;elsec=fun(n-1)*2;return(c);}main(){int n;printf("Enter n:");scanf("%d",n);printf("The result:%d\n\n",fun(n));}