Showing posts with label maximum number checker in java. Show all posts
Showing posts with label maximum number checker in java. Show all posts

Sunday, September 3, 2017

Maximum Value Checker in Java

A very simple program that I wrote that will check and determine which of the given list of numbers in our array is the maximum or the biggest in terms of numerical value using Java as my programming language.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing


Maximum_values.java


/**
 * 
 */
package array_demo;

/**
 * @author Jacob F. Pomperada
 * September 3, 2017  Sunday
 * Mandaluyong City, Metro Manila
 *
 */
public class Maximum_values {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int b[] = {100,35,567,5,62};
int max_value=0;
for (int a=0; a<5; a++)
{
if (b[a] > max_value)
{
max_value=b[a];
}
}

 System.out.println();
       System.out.println("Maximum Value Checker in Java");
       System.out.println();
       System.out.println("Written By Mr. Jake R. Pomperada, MAED-IT");
       System.out.println();
        System.out.print("The Maximum value in the array is " + max_value + ".");
System.out.println("\n\n");
       System.out.println("End of Program");
       System.out.println();

}

}