<?xml version =“1.0”?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<!-- Fig. 7.6: welcome5.html–>
<!— Using Promt Boxes -->
<html xmlns =“http://www.w3.org/1999/xhtml”>
<head>
<title> 10 points for MOHAMMAD REZZA && PASS THE TEST55+10=65</title>
<script type=“text/javascript”>
<!–
var x,y,z,o,p,maxValue,minValue;
var xVal, yVal, zVal, oVal, pVal;
// read the name from the prompt box as a string
xVal = window.prompt(“please enter your first integer”, “0”);
yVal = window.prompt(“please enter your second integer”, “0”);
zVal = window.prompt(“please enter your first integer”, “0”);
oVal = window.prompt(“please enter your first integer”, “0”);
pVal = window.prompt(“please enter your first integer”, “0”);
x=parseInt (xVal);
document.writeln("<br/>First number is: " +x);
y=parseInt (yVal);
document.writeln("<br/>Second number is: " +y);
z=parseInt (zVal);
document.writeln("<br/>Third number is: " +z);
o=parseInt (oVal);
document.writeln("<br/>Fourth number is: " +o);
p=parseInt (pVal);
document.writeln("<br/>Fifth number is: " +p);
{
var maxValue;
if (x>y)
{
maxValue =x ;
}
else
{
maxValue = y;
}
if (y>z)
{
maxValue =y ;
}
else
{
maxValue = z;
}
if (z>o)
{
maxvalue =z;
}
else
{
maxValue = o;
}
if (o>p)
{
maxvalue =o;
}
else
{
maxValue = p;
}
{
document.writeln("<br/>The MAXIMUM number is: " +maxValue);
}
}
{
var minValue;
if (x<y)
{
minValue =x ;
}
else
{
minValue = y;
}
if (y<z)
{
minValue =y ;
}
else
{
minValue = z;
}
if (z<o)
{
minValue =z;
}
else
{
minValue = o;
}
if (o<p)
{
minValue =o;
}
else
{
minValue = p;
}
{
document.writeln("<br/>The MInImum number is: " +minValue);
}
}
//–>
</script>
</head>
<body>
<p> click Refresh to run this script again.</p>
</body>
</html>