Created
August 30, 2015 13:26
-
-
Save gutchom/f6ea47323fb8b7caf01f to your computer and use it in GitHub Desktop.
尊師の勉強教材の途中。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>hell</title> | |
</head> | |
<body> | |
<h1>sonshi world</h1> | |
</body> | |
<script> | |
function hyakubai(a) { | |
return a * 100; | |
} | |
var atai = prompt("100倍したい数値を入れろ", ""); | |
atai = parseFloat(atai); | |
function eigoukaiki () { | |
var zaregoto = []; | |
while(isNaN(atai)) { | |
atai = prompt(zaregoto.length + "回でできひんのか!数字入れろ", ""); | |
zaregoto.push(atai); | |
} | |
return zaregoto | |
} | |
var zaregototachi = eigoukaiki(); | |
var kaisuu = zaregototachi.length; | |
var kekka = hyakubai(atai); | |
if(kaisuu > 1) { | |
alert("お前は" + kaisuu + "回も戯言を言った。\nいまからそれを復唱してやる。"); | |
for(var i=0; i < zaregototachi.length; i++) { | |
alert(zaregototachi[i]); | |
} | |
} else { | |
alert("一発やんけ。えらいな。\n" + "結果は" + kekka + "やで。"); | |
} | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment