factorial of given number


<html>
<head>
<title>factorial</title>
<script type="text/javascript" >
function factorial()
{
var a=document.getElementById("tx1").value;
var n=parseInt(a)
var fact=1;
for(var i=1;i<=n;i++)
fact=fact*i;
document.getElementById("tx2").value=fact;
}
</script>
</head>
<body>
<h3>finding factorial</h3>
<form action="" >
<p>enter a number <input type="text"id="tx1"size="20"/><br/>
factoril<input type="text"id="tx2"size="20"/><br/>
<input type="button"value="find"onclick="factorial()"/>
<input type="reset"value="clear"/>
</p>
</form>
</body>
</html>

2 comments:

velraj said...

Thanks for sharing this great blog. That is very interesting to read and I am always searching for informative blog like this.
Html5 Training in Chennai
Html5 Courses in Chennai
DOT NET Training in Chennai
DOT NET Training Chennai
dot net course fees in chennai
QTP Training in Chennai
LoadRunner Training in Chennai
Html5 Training in Chennai

Janu said...

I would like to say thank you for the amazing details and concepts you are sharing in this.The style of writing is excellent and also the content is top-notch. Thanks for that shrewdness you provide the readers!


Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery







My Favorite Books

  • C and Data Structures by Ashok N. kamthane
  • Web Technologies by A. A. Puntambekar
  • Learn HTML and CSS with W3Schools
  • Learn JavaScript and Ajax with W3Schools
  • HTML5 Black Book: Covers Css3, Javascript,XML, XHTML, Ajax, PHP And Jquery
  • HTML5 Application Development Fundamentals: MTA Exam 98-375
  • .NET 4.0 Programming 6-In-1, Black Book
  • SQL Server 2008 R2 Black Book
  • Asp.net 4.0 Projects Covers: net 3.5 And .net 4.0 Codes, Black Book
  • UNIX Shell Programming 1 Edition by Yashavant Kanetkar
  • UNIX and Shell Programming 1 Edition by Richard F. Gilberg, Behrouz A. Forouzan
  • Computer Networks by Andrew S. Tanenbaum
  • Multiple Choice questions in computer science by Timothy J Williams