Skip to content

Instantly share code, notes, and snippets.

@gutchom
Created August 30, 2015 13:26
Show Gist options
  • Save gutchom/f6ea47323fb8b7caf01f to your computer and use it in GitHub Desktop.
Save gutchom/f6ea47323fb8b7caf01f to your computer and use it in GitHub Desktop.
尊師の勉強教材の途中。
<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