-
Notifications
You must be signed in to change notification settings - Fork 1
/
task.html
21 lines (21 loc) · 2.03 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<h2>Liquid pressure</h2>
<html>
<head></head>
<body>
<p>Write a program that reads the <strong>density of a liquid</strong> <em>ρ </em>and the <strong>height of a column </strong><em>h</em>, and calculates the <strong>liquid pressure </strong><em>p</em>.</p>
<ul>
<li>We suppose the <strong>gravity</strong> is 9.8 m/s² (Earth).</li>
<li>Do not format the result.</li>
</ul>
<p><strong>Some explanations</strong></p>
<p>When a person swims under the water, water pressure is felt like acting on the person's eardrums. The deeper that person swims, the greater the pressure. The pressure felt is due to the weight of the water above the person. As someone swims deeper, there is more water above the person and therefore greater pressure. The pressure a liquid exerts depends on its depth.</p>
<p>Liquid pressure also depends on the density of the liquid. If someone was submerged in a liquid more dense than water, the pressure would be correspondingly greater. Thus we can say that the depth, density and liquid pressure are directly proportionate. The pressure due to a liquid in liquid columns of constant density or at a depth within a substance is represented by the following formula:</p>
<p style="text-align: center;"><img alt="displaystyle prho gh" src="https://wikimedia.org/api/rest_v1/media/math/render/svg/52e88d7677c00e22d3c91ce6e1fd69f7b77cb814"></p>
<p>where:</p>
<p><em>- p</em> is <strong>liquid pressure</strong>,</p>
<p><em>- g</em> is <strong>gravity</strong> at the surface of overlaying material,</p>
<p><em>- ρ</em> is <strong>density</strong> of liquid,</p>
<p><em>- h</em> is <strong>height </strong>of liquid column.</p>
</body>
</html><br><b>Sample Input:</b><br><pre><code class="language-no-highlight">1.7 5.5</code></pre><br><b>Sample Output:</b><br><pre><code class="language-no-highlight">91.63</code></pre><br><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 8 seconds</font><br><br>
<a href="https://hyperskill.org/learn/step/3517">Show topic summary</a>