潘家文

物联网205 202017170519 潘家文 发表于2020年11月10日
<p>#include &lt;stdio.h&gt;</p><p><br ></p><p>int main(int argc, char *argv[])</p><p><br ></p><p>{</p><p><br ></p><p> float Fatherheight;</p><p> float Motherheight;</p><p> float boyheight;</p><p> float girlheight;</p><p> printf(&quot;请输入父亲·母亲身高,输入格式为:(?,?),单位为米\n&quot;);</p><p> scanf(&quot;%f%f&quot;,&amp;Fatherheight,&amp;Motherheight);</p><p> printf(&quot;父亲的身高:%.2f&quot;,Fatherheight);</p><p> printf(&quot;母亲的身高:%.2f&quot;,Motherheight);</p><p> boyheight=(Fatherheight+Motherheight)*1.08/2;</p><p> printf(&quot;男孩的身高:%.2f\n&quot;,boyheight);</p><p> girlheight=(Fatherheight+0.923*Motherheight)/2;</p><p> printf(&quot;女孩的身高:%.2f\n&quot;,girlheight);</p><p> return 0;</p><p><br ></p><p>}</p><p><br ></p>