/** A program that calculates ideal body weight given someone's height.
 */

package idealbodyweight;

/**
 *
 * @author k8port
 */
import java.util.Scanner;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class IdealBodyWeight {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        // declare variables
        String name;
        int feet, inches;  // for a person's height
        Scanner tenneile = new Scanner(System.in);
        Scanner captain = new Scanner(System.in);
        
        // gather user info
        System.out.println("Please enter your height in first in feet and then "
                + "in inches.\nPut a space between the two variables.");
        feet = tenneile.nextInt();
        inches = tenneile.nextInt();
        
        // calculate ideal weight   
        int ideal = 110 + ((feet - 5) * 110) + (inches * 5);
        // output result
        System.out.println("Your ideal body weight is: " + ideal);
        
        System.out.println("Now let's gather info from the database file.");
        try {
            captain = new Scanner(new FileInputStream("heights.txt"));
            name = captain.nextLine();
            feet = captain.nextInt();
            inches = captain.nextInt();
            ideal = 110 + ((feet - 5) * 110) + (inches * 5);
            System.out.printf("%s's ideal body weight at %d feet and "
                        + "%d inches is %d.%n", name, feet, inches, ideal);
            String clear = captain.nextLine();
            name = captain.nextLine();
            feet = captain.nextInt();
            inches = captain.nextInt();
            ideal = 110 + ((feet - 5) * 110) + (inches * 5);
            System.out.printf("%s's ideal body weight at %d feet and "
                        + "%d inches is %d.%n", name, feet, inches, ideal);  
            clear = captain.nextLine();
            name = captain.nextLine();
            feet = captain.nextInt();
            inches = captain.nextInt();
            ideal = 110 + ((feet - 5) * 110) + (inches * 5);
            System.out.printf("%s's ideal body weight at %d feet and "
                        + "%d inches is %d.%n", name, feet, inches, ideal);  
        } catch (FileNotFoundException e) {
            System.out.println("File not found");
            System.exit(0);
        }
       
    }
    
}

@@ -565,32 +565,54 @@
 ner(System.in);%0A
+        String clear;%0A
         %0A       
@@ -596,32 +596,32 @@
 clear;%0A        %0A
-
         // gathe
@@ -1244,407 +1244,99 @@
     
-name = captain.nextLine();%0A            feet = captain.nextInt();%0A            inches = captain.nextInt();%0A            ideal = 110 + ((feet - 5) * 110) + (inches * 5);%0A            System.out.printf(%22%25s's ideal body weight at %25d feet and %22%0A                        + %22%25d inches is %25d.%25n%22, name, feet, inches, ideal);%0A            String clear = captain.nextLine();%0A            name = captain.nextLine();%0A
+while (captain.hasNext()) %7B%0A               %0A                name = captain.nextLine();%0A    
     
@@ -1361,32 +1361,36 @@
 tain.nextInt();%0A
+    
             inch
@@ -1417,32 +1417,36 @@
 ();%0A            
+   
+ 
 ideal = 110 + ((
@@ -1470,32 +1470,36 @@
 + (inches * 5);%0A
+    
             Syst
@@ -1569,32 +1569,36 @@
                 
+ 
+   
 + %22%25d inches is 
@@ -1624,35 +1624,35 @@
  inches, ideal);
+%0A
   
-%0A
             clea
@@ -1651,362 +1651,51 @@
     
-clear = captain.nextLine();%0A            name = captain.nextLine();%0A            feet = captain.nextInt();%0A            inches = captain.nextInt();%0A            ideal = 110 + ((feet - 5) * 110) + (inches * 5);%0A            System.out.printf(%22%25s's ideal body weight at %25d feet and %22%0A                        + %22%25d inches is %25d.%25n%22, name, feet, inches, ideal);  
+  clear = captain.nextLine();%0A            %7D
 %0A   

Update IdealBodyWeight.java