Loading
View RSS Feed

bali

Program Code in Java Script to find the maximum of three numbers.

Rating: 2 votes, 4.50 average.
Click image for larger version. 

Name:	maximum.jpg 
Views:	223 
Size:	10.1 KB 
ID:	183
Code:
<html>
	<head>
		<title>MAXIMUM OF THREE NO</title>
		<script type="text/javascript">
		function max(f)
			{
				var a,b,c,m;
				a=parseInt(f.t1.value);
				b=parseInt(f.t2.value);
				c=parseInt(f.t3.value);
				if(a>b)
				{
				
					if(a>c)
					{
					
						f.t4.value=a;
					}
					
					else
						f.t4.value=c;
				}
				else 
				{
					if(b>c)
					{
						f.t4.value=b;
					}
					
					else
					{
						f.t4.value=c;
					}
				}
				
			}
				
		</script>

	</head>
	
	<body bgcolor=bisque text=black>
	<form name="f">
	<center>enter the first no:: <input type=text name=t1></center></br>
	
	<center>enter the second no:: <input type=text name=t2></center></br>
	
	<center>enter the third no:: <input type=text name=t3></center></br>
	<center><input type="button" value="Find maximum" onClick=max(this.form)><center><br>
<br>
	
	<center>the max among three no is:: <input type=text name=t4></center></br>
	
	

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

Submit "Program Code in Java Script to find the maximum of three numbers." to Digg Submit "Program Code in Java Script to find the maximum of three numbers." to del.icio.us Submit "Program Code in Java Script to find the maximum of three numbers." to StumbleUpon Submit "Program Code in Java Script to find the maximum of three numbers." to Google

Updated 02-27-2011 at 08:13 AM by angad

Categories
Web Design

Comments

  1. angad's Avatar
    impessive work bali. i will suggest others also to add the pictures if they are doing it in java script specially.
  2. bali's Avatar
    thanks angad. i will keep up the good work.



Disclaimer: Users of techforum4u.com are responsible for ensuring that any material they post (article, blog posts, images or other mulitimedia content) does not violate or infringe upon the copyright, patent, trademark, or any personal or proprietary rights of any third party, and is posted with the permission of the owner of such rights.Anyone who violates these rules may have their access privileges removed without warning.