title: using a loop get a user to input an integer 10 times then get the minimum
body: <p>I've got a homework assignment where I need to write a program using a loop that takes 10 integer values from a user and outputs the minimum of all values entered.</p>
  
  <p>Here is what I've got:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Num52
  {
      public static void main (String [] args )
      {
  
     int value;
     int minValue;
  
     Scanner scan = new Scanner(System.in);
  
     for( int i = 0; i &lt; 10; i++ )
     {
  
        System.out.print( "Enter a number as an integer &gt; " );   
  
        value = scan.nextInt( );
  
        if( value &lt; minValue )
  
        minValue = value;
  
        }
  
        System.out.println( "The minimum number is " + minValue );
  
  
    }
   }
  </code></pre>