C语言模拟题

{

/**/

int i,j=0,k,temp; for(i=0;i

if(a[i]>0)

{b[j]=a[i];c[j]=a[i];j++;} } k=j;

for(i=0;ic[j+1]) {temp=c[j+1]; c[j+1]=c[j]; c[j]=temp;

}

return k; /**/ }

void main()

{ int n = 10, i, nb;

int aa[10] = {12, -10, -31, -18, -15, 50, 17, 15, -20, 20}; int bb[10], cc[10]; clrscr();

printf(\ printf(\

for(i=0; i

nb = fun2(aa, n, bb, cc); printf(\

for (i=0; i

printf(\

for(i=0; i

printf(\ getch(); } 37、

#include #include void main()

{/**/ /**/x,x0,f,f1; double x=1.85;

/**/ /**/ do { x0=x;

f=((x0-2)*x0+3)*x0-6; f1=(3*x0-4)*x0+3; x=x0-f/f1;

}while(fabs(x-x0)>=1e-6); printf(\ getch(); }??

联系客服:779662525#qq.com(#替换为@)