<title>24 Point </title>
<meta name= "Author" content= "dlpower@163.com" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body>
<br>
Compute 24 Dots (add, subtract, multiply, divide, bracket) JavaScript version v1.0<br><br>
Author: <a href= ' mailto:dlpower@163.com ' >dlpower@163.com</a> (please specify author) <br><br>
2004-04-26 <br><br><br><br>
<form>
Please enter four digits (1-13):<br><br>
<input type= "text" name= "FA" size= "2" >
<input type= "text" name= "FB" size= "2" >
<input type= "text" name= "FC" size= "2" >
<input type= "text" name= "FD" size= "2" >
<br><br><input type= "button" Name= "btn" value= "calculation" >
</form>
<br><br>
<br><br>
In a deck of cards (52), the arbitrary extraction of 4 sheets can have 1820 different combinations, of which 458 are not 24 points.
<br><br>
The mid 1980s, Sun Shijie from Shanghai to the United States to settle. Sun Shijie A few of the neighbors are Americans. Neighbor's <br>
Child to his house, he had no other toys for the children to play, Brainwave, took out a pair of poker to teach them <br>
Play "24 points". Who knows, this play, unexpectedly make American children are fascinated. These kids bring this game home again and <br>
School, it was found that the game was very useful for developing intelligence, which was later promoted throughout the United States.
<script language= "JavaScript" >
function log (str)
{
document.write ("<br>" +str);
}
Generate a calculation expression
function Genexpress (EXP,A,B,C,D,M1,M2,M3)
{
var exp=exp.replace ("A", a);
Exp=exp.replace ("B", b);
Exp=exp.replace ("C", c);
Exp=exp.replace ("D", D);
Exp=exp.replace ("M1", M1);
Exp=exp.replace ("M2", m2);
Exp=exp.replace ("M3", m3);
return exp;
}
var answer = new Array ()//Expression of correct answer
var counter = number of 0;//answers
Test expression is correct