问答题

改正下列程序中不正确的语句。   main()   { int n ;   float s=1.0;   for(n=10;n>1;n- -)   s=s+1/n;   printf(“%6.1f\n”,s); }

【参考答案】

s=s+1.0/n