Showing posts with label Minimum Value Checker in Java. Show all posts
Showing posts with label Minimum Value Checker in Java. Show all posts

Sunday, September 3, 2017

Minimum Value Checker in Java

A very simple program that I wrote using Java to check which of the list of numbers in an array is the smallest in terms of numerical value.  The code is very simple and easy to understand.

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


minimum_value.java


/**
 * 
 */
package array_demo;

/**
 * @author Jacob
 *
 */
public class minimum_value {

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

 System.out.println();
       System.out.println("Minimum 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 Minimum value in the array is " + min_value + ".");
System.out.println("\n\n");
       System.out.println("End of Program");
       System.out.println();
}

}