This commit is contained in:
qrhlhplhp 2022-10-26 17:22:44 +09:00
parent b43ed91084
commit d63d9fdb67
2 changed files with 76 additions and 0 deletions

49
APMC/index.html Normal file
View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APMC</title>
</head>
<body>
<h1>APPLE PER MAN CALCULATOR</h1>
<h2>INPUT THESE NUMBER ; YOU CAN USE A NEGATIVE NUMBER</h2>
<label>INPUT THE NUMBER OF APPLE<br>
<input type="number" id="goki" name="goki"><br>
</label><label>INPUT THE NUMBER OF POPULATION<br>
<input type="number" id="buri" name="buri"><br><br>
</label>
<button id="calcul">CALCULATE</button>
<table border="1" style="color:red; border-collapse:collapse; border-width:5px; margin-top:5vh;">
<tr>
<th>apple</th>
<td style="text-align:right;" id="apu">
</td>
</tr><tr>
<th>population</th>
<td style="text-align:right;" id="popu">
</td>
</tr><tr>
<th>APM</th>
<td style="text-align:right;" id="apm">
</td>
</tr>
</table>
<h2>POVERTY LEVELS BY APM</h2>
<table>
<tr><th>APM≦0</th><td style="text-align:right">grinding poverty</td></tr>
<tr><th>0&lt;APM≦1</th><td style="text-align:right">normal poverty</td></tr>
<tr><th>1&lt;APM≦10</th><td style="text-align:right">honorable poverty</td></tr>
<tr><th>10&lt;APM≦100</th><td style="text-align:right">little rich</td></tr>
<tr><th>100&lt;APM≦1000</th><td style="text-align:right">normal rich</td></tr>
<tr><th>1000&lt;APM</th><td style="text-align:right">extreme rich</td></tr>
</table>
<h2>THE ORIGIN OF THE APMC</h2>
<p>Apple Per Man Calculator, The APMC was developed by Qrhlhphp in order to show you the nature of poverty.</p>
<p>21st century is filled with lots of poverty. It made us injure each other, and the wars caused have made our poverty furthermore terrible.</p>
<p>You have thoughts that it is a very difficult to solve the issue of poverty, which are all wrong. It is not so much complex thing as a obvious thing.</p>
<p>It is natural that you should distrust my words. But first try the APMC. You will find the nature of poverty immediately.</p>
</body>
<script src="main.js"></script>
</html>

27
APMC/main.js Normal file
View File

@ -0,0 +1,27 @@
let calcul = document.getElementById("calcul");
let goki = document.getElementById("goki");
let buri = document.getElementById("buri");
let apu = document.getElementById("apu");
let popu = document.getElementById("popu");
let apm = document.getElementById("apm");
apu.innerText = 10;
popu.innerText = 3;
apm.innerText = 10 / 3;
calcul.addEventListener('click', calculate);
window.document.onkeydown = function(event){
if (event.key === 'Enter') {
calculate();
}
}
function calculate(){
apu.innerText = goki.value == "" ? 0 : goki.value;
popu.innerText = buri.value == "" ? 0 : buri.value;
if(buri.value == 0)
apm.innerText = "you";
else
apm.innerText = goki.value / buri.value;
}