#osak先生の数当てゲーム 普通の生徒用 TAの模範解答 $score = 0; while(){ for($i=0; $i<=3; ++$i){ $rnd[$i] = int(rand(99)); } @rnd = sort @rnd; print "Input 0..99 number->"; my $in = ; if($in >= $rnd[0] && $in <= $rnd[3] ){ $score = $score + 10; print "Clear! Score=$score\n"; }else{ print "OUT! Score=$score\n"; last; } }