Tuesday, February 18

Finding Biggest Number in Math Functionality (MAX) Using Java



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

Backup files to google drive using PHP coding

 Dear All, To backup files to Google Drive using PHP coding, you can use the Google Drive API and the Google Client Library for PHP. Here...