华农C语言教材习题参考答案

注:答案仅供参考分期还款: #include <stdio.h>#include <math.h>int main(){ double d, p,r; scanf("%lf%lf%lf",

注:答案仅供参考 分期还款: #include&lt;stdio.h&gt; #include&lt;math.h&gt; intmain() { doubled,p,r; scanf("%lf%lf%lf",&amp;d,&amp;p,&amp;r); printf("%.1f",log10(p/(p-d*r))/log10(1+r)); return0; } : 计算分段函数函数值 #include&lt;stdio.h&gt; intmain() { doublex; scanf("%lf",&amp;x); if(x&lt;1)printf("%.2f",x); elseif(x&gt;=1&amp;&amp;x&lt;10)printf("%.2f",2*x-1); elseprintf("%.2f",3*x-11); } 成绩等级评分: #include&lt;stdio.h&gt; #include&lt;math.h&gt; intmain() { intscore; scanf("%d",&amp;score); if(score&gt;100||score&lt;0) printf("error"); elseif(score&gt;=90) printf("A"); elseif(score&gt;=80) printf("B"); elseif(score&gt;=70) printf("C"); elseif(score&gt;=60) printf("D"); else printf("E"); return0; } 1

腾讯文库华农C语言教材习题参考答案