add APMC
This commit is contained in:
		
							parent
							
								
									b43ed91084
								
							
						
					
					
						commit
						d63d9fdb67
					
				
							
								
								
									
										49
									
								
								APMC/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								APMC/index.html
									
									
									
									
									
										Normal 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<APM≦1</th><td style="text-align:right">normal poverty</td></tr>
 | 
			
		||||
<tr><th>1<APM≦10</th><td style="text-align:right">honorable poverty</td></tr>
 | 
			
		||||
<tr><th>10<APM≦100</th><td style="text-align:right">little rich</td></tr>
 | 
			
		||||
<tr><th>100<APM≦1000</th><td style="text-align:right">normal rich</td></tr>
 | 
			
		||||
<tr><th>1000<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
									
								
							
							
						
						
									
										27
									
								
								APMC/main.js
									
									
									
									
									
										Normal 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;
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user