code
<html>
<head>
<script type="text/javascript">
function solve(){
document.asim.val.value=eval(document.asim.val.value);
}
</script>
</head>
<body><center>
<form name="asim">
<table border="4">
<tr><td colspan="4"><input type="text" name="val" size="45"></td></tr>
<tr><td><input type="button" value="1" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='1'"/></td>
<td><input type="button" value="2" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='2'"/></td>
<td><input type="button" value="3" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='3'"/></td>
<td><input type="button" value="4" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='4'"/></td></tr>
<tr><td><input type="button" value="5" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='5'"/></td>
<td><input type="button" value="6" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='6'"/></td>
<td><input type="button" value="7" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='7'"/></td>
<td><input type="button" value="8" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='8'"/></td></tr>
<tr><td><input type="button" value="9" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='9'"/></td>
<td><input type="button" value="0" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='0'"/></td>
<td><input type="button" value="+" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='+'"/></td>
<td><input type="button" value="-" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='-'"/></td><tr>
<tr><td><input type="button" value="x" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='*'"/></td>
<td><input type="button" value="/" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='/'"/></td>
<td><input type="button" value="Mod" style="height: 25px; width: 70px" onclick="(document.asim.val.value) +='%'"/></td>
<td><input type="button" value="=" style="height: 25px; width: 70px" onclick="solve()" /></td></tr>
</table>
</center>
</body>
</html>
aoayeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee wahhhhhhhhhhhhhhhhhhhhhh yarrrrrrrrrrrrrrrrr
ReplyDelete