c语言编写程序求数列1,3,3,3,5,5,5,5,5,7,7,7,7,7,7,7的第四十项?_百...答:main(){ int i,n;i=1;n=15;while (n>=0){ n=n-i;i=i+2;} printf("%d",i);} 或:include<stdio.h> main(){ int i,j,k,cont=0;for(i=1;cont<15;i+=2){for(j=1;j<=i;j++) { baiprintf("%d ",i); cont++; k=i; } }printf("\n");printf("the 15th is:...
C语言:输入x(R: >0),求数列2/1,3/2,5/3,8/5,…前n项和大于x的最小值...答:int main(int argc,char *argv[]){ double s,x;int a,b,n;printf("Please enter x(int 0<x<70)...\n");if(scanf("%lf",&x)==1 && x>0 && x<70){ for(s=n=0,b=2,a=1;s<=x;s+=(b+0.0)/a,b+=a,a=b-a,n++);printf("The result is %.5f\nn = %d\n"...