Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update title with test string #11

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions calc.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<html>
<head>
<title>Calc</title>

<title>h4num4n TEST Calc</title>

<script language=javascript type="text/javascript">

var plus,minus,divide,multiply
var plus,minus,divide,multiply,max,pow,min,avg

function initialize(){
plus=document.calc.operator.options[0]
minus=document.calc.operator.options[1]
divide=document.calc.operator.options[2]
multiply=document.calc.operator.options[3]
max=document.calc.operator.options[4]
pow=document.calc.operator.options[5]
min=document.calc.operator.options[6]
avg=document.calc.operator.options[7]
}

function calculate(){
Expand All @@ -23,7 +28,15 @@
if (divide.selected)
document.calc.answer.value = a / b
if (multiply.selected)
document.calc.answer.value = a * b
document.calc.answer.value = a * b
if (max.selected)
document.calc.answer.value = Math.max(a,b)
if (pow.selected)
document.calc.answer.value = Math.pow(a,b)
if (min.selected)
document.calc.answer.value = Math.min(a,b)
if (avg.selected)
document.calc.answer.value = (a + b) / 2
}

</script>
Expand All @@ -44,16 +57,20 @@ <h2>Calc</h2>
<option value=minus>-
<option value=divide>/
<option value=multiply>*
<option value=max>max
<option value=pow>**
<option value=min>min
<option value=avg>avg
</select>

<input type=text name=val2 size=10>
=
<input type=text name=answer size=10>
<input type=button value=answer onClick="calculate()">
<input type=button value="show answer" onClick="calculate()">
</form>

<br><br>


</body>
</html>
</html>