To find the maximum of three numbers using JSP, you can create a simple form to accept three numbers as input. Upon form submission, you can use JSP scriptlets to compare the numbers and determine the maximum. Here’s a basic example:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>Find Maximum of Three Numbers</title>
</head>
<body>
<form method="post">
Number 1: <input type="number" name="num1"><br>
Number 2: <input type="number" name="num2"><br>
Number 3: <input type="number" name="num3"><br>
<input type="submit" value="Find Maximum">
</form>
<%
String num1Str = request.getParameter("num1");
String num2Str = request.getParameter("num2");
String num3Str = request.getParameter("num3");
if (num1Str != null && num2Str != null && num3Str != null) {
int num1 = Integer.parseInt(num1Str);
int num2 = Integer.parseInt(num2Str);
int num3 = Integer.parseInt(num3Str);
int max = Math.max(num1, Math.max(num2, num3));
out.println("Maximum number is: " + max);
}
%>
</body>
</html>
This program displays a form to input three numbers and outputs the maximum number after submission.
Since there is an infinite set of prime numbers the answer would be infinity.
Write your own prime number program and find out.
program to find prime number in 8085 microprocessor
You write down the multiples of those four numbers and find the LCM. EX. 1:1,2,3,4,5,6,7,8,9,10,11,12 2:1,2 3:1,3 4:1,2,3 So the LCM is 2.
Shell program to find LCM and hcf of two no.s tput clear echo "Enter first no" read a echo "Enter 2nd no" read b p= 'expr $a \* $b' while [$b -ne 0] do r= 'expr $a % $b' a=$b b=$r done LCM = 'expr $p / $a' echo "LCM = $LCM" echo "Hcf = $a"
program to find maximum of two numbers using pointers
write an assembly language program to find sum of N numbers
VBnet program to find the prime numbers between 100 to 200?
k
(defun max3 (a b c) (cond ((> a b) (cond ((> a c) a) (t c))) ((> b c) b) (t c) ) )
i need this answer
Please visit http://talentsealed.blogspot.com/2009/10/to-find-sqaure-of-numbers-using-c.htmlfor the answer.
Since there is an infinite set of prime numbers the answer would be infinity.
maxValue = function (array) {mxm = array[0];for (i=0; i<array.length; i++) {if (array[i]>mxm) {mxm = array[i];}}return mxm;}; i don't know
huh?
The maximum of a set of numbers is the largest number in the set.
for(int i = 1; i < 100; i+=2) { System.out.println(i); }