/* Warmup problem 1 for Senior research course. "Hailstone" problem. Find the max count for the "hailstone" number. if n is even, divide by 2. otherwise n = 3n+1. Count the iterations for n to become 1. */ import javax.swing.JOptionPane; import java.util.Scanner; import java.io.*; public class Warmup1JavaShell { public static int sequence(int num) { int count=1; // ... Complete this section return count; } public static void main(String[] args) { FileReader infile = null; try { infile = new FileReader("infile1.txt"); } catch (FileNotFoundException ex) { System.out.println("File does not exist"); } Scanner scanner = new Scanner(infile); int i,j, temp, max; while (scanner.hasNext()) { i = scanner.nextInt(); j = scanner.nextInt(); max=i; // ... Complete this section System.out.println("" + i + "\t" + j + "\t" + max); } } }