JUDGER_AND_CLIENT/client/problem.html

9 lines
2.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<center><h1 style="font-family:verdana;color:blue">1.a/b 结果为AC示例</h1></center><center><p>&nbsp&nbsp时间限制1.0&nbsp&nbsp章节:分支结构</p></center><center><p>晚于2029-11-30 23:55:00.0&nbsp&nbsp后提交分数乘系数40.0%</p></center><center><p>截止时间2040-12-30 23:55:00</p></center><h2 style="font-family:verdana;color:blue">问题描述</h2><p>输入两个实数a和b计算a/b的值并输出。<br/>如果b为0则输出error否则输出结果保留两位小数。</p><p>&nbsp;</p><p>C语言代码如下<br/>#include &lt;stdio.h&gt;<br/>int main()<br/>{<br/>&nbsp;&nbsp;&nbsp; double
a,b,c;<br/>&nbsp;&nbsp;&nbsp; while(scanf(&quot;%lf%lf&quot;, &amp;a, &amp;b) != EOF)<br/>&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp; if
(b!=0)<br/>&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c=a/b;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;%.2f\n&quot;, c);<br/>&nbsp;&nbsp;&nbsp;
}<br/>&nbsp;&nbsp;&nbsp; else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;error\n&quot;);<br/>&nbsp;&nbsp;&nbsp; }</p><p>&nbsp; &nbsp; return 0;<br/>}</p><p>将以上代码复制到提交框中运行结果将为AC正确可看到所有测试用例运行都正确。<br/></p><p>此时,系统将自动提交本题,在左侧的题目列表中,本题将变灰。</p><h2 style="font-family:verdana;color:blue">输入说明</h2><p>你写的程序要求从标准输入设备中读入测试数据作为你所写程序的输入数据。标准输入设备中有多组测试数据每组测试数据仅占一行每行有两个实数a和b。每组测试数据与其后一组测试数据之间没有任何空行第一组测试数据前面以及最后一组测试数据后面也都没有任何空行。<br/></p><p><br/></p><h2 style="font-family:verdana;color:blue">输出说明</h2><p>对于每一组测试数据你写的程序要求计算并输出运算结果。如果b为0则输出error否则输出结果保留两位小数。<br/>每组运算结果单独占一行,其行首和行尾都没有任何空格或其他任何字符,每组运算结果与其后一组运算结果之间没有任何空行或其他任何字符,第一组运算结果前面以及最后一组运算结果后面也都没有任何空行或其他任何字符。
注:通常,显示屏为标准输出设备。</p><p><br/></p><h2 style="font-family:verdana;color:blue">输入范例</h2><textarea wrap="off" style="font-family:'宋体';width:100%" rows="4">1 0
1 2
</textarea><h2 style="font-family:verdana;color:blue">输出范例</h2><textarea wrap="off" style="font-family:'宋体';width:100%" rows="4">error
0.50
</textarea>