// Author : Apostolos Syropoulos // Program : ``Fourth Grade Solution'' Towers of hanoi // Date : November 16, 1997 // import java.io.*; import java.lang.Math; public class hanoiC { static int moves=0; //number of moves so far static int getInt() { String line; BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); try { line = in.readLine(); int i = Integer.valueOf(line).intValue(); return i; } catch (Exception e) { System.err.println("***Error: Input is not a number.\n" + "Input assumed to be the number 1"); return 1; } } static void hanoi(int height) { int fromPole, toPole, Disk; int[] BitStr = new int[height], Hold = new int[height]; char[] Place = {'A', 'C', 'B'}; int i, j, temp; for (i=0; i