<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function min()
{
num1=document.all.item("txt1").value;
num2=document.all.item("txt2").value;
num3=document.all.item("txt3").value;
num4=document.all.item("txt4").value;
num5=document.all.item("txt5").value;
a=num1;
if(a>num2)
{a=num2;}
if(a>num3)
{a=num3;}
if(a>num4)
{a=num4;}
if(a>num5)
{a=num5;}
alert("Min value is "+a);
}
function avg()
{
num1=document.all.item("txt1").value;
num2=document.all.item("txt2").value;
num3=document.all.item("txt3").value;
num4=document.all.item("txt4").value;
num5=document.all.item("txt5").value;
total=(num1+num2+num3+num4+num5)/5;
alert("average value is"+total);
}
//-->
</SCRIPT>
</HEAD>
<BODY>
Enter a number <input type="number" name="txt1"><br>
Enter a number <input type="number" name="txt2"><br>
Enter a number <input type="number" name="txt3"><br>
Enter a number <input type="number" name="txt4"><br>
Enter a number <input type="number" name="txt5"><br>
<input type="button" value="Enter" onclick="min()">
<input type="button" value="average" onclick="avg()">
</BODY>
</HTML>