Hi ALL,
Here I wrote a program for Finding Biggest Number in Math Functionality (MAX) Using java.
/**
*
* @author Balamurgan
M
*/
import java.util.Scanner;
public class MaxMethod {
public static void
main(String arg[]){
System.out.println(" Max of given number ");
Scanner in=new
Scanner(System.in);
int
m=in.nextInt();
int
n=in.nextInt();
System.out.println(" Max of number : "+max(m,n));
}
public static int
max(int a,int b){
int value;
if(a>b)
value=a;
else
value=b;
return value;
}
}
No comments:
Post a Comment