PROGRAM.HTML
<html>
<body>
<script language="javascript">
var i;
var inp=parseInt(prompt("enter the end range value","3"));
document.write("no"+"   "+"square"+"   "+"squareroot"+"   "+"cube"+"   "+" complement "+"<br>");
for(i=1;i<=inp;i++){
var sq=i*i;
var srt=Math.round(Math.sqrt(i));
var cu=i*i*i;
var comp=(-i);
document.writeln(i+"      "+sq+"           "+srt+"                      "+cu+"         "+comp+"<br>");
}
</script>
</body>
</html>
OUTPUT
No comments:
Post a Comment