
/**  
 * 
 *  This program prompts user to enter a number in centimeters, then displays the number as feet and inches.
 *   
 *   CST8110 Introduction to Computer Programming
 *   
 *   
 */



import java.util.Scanner;	//program uses class Scanner


public class InLab1 {

	public static void main (String args[]) {
		//main method
		
		Scanner input = new Scanner (System.in);
		
		int numberInCenti;
		
		System.out.print("This program, written by Jo Suh, will convert a length in centimetres to feet and inches\nEnter the number of centimetres: ");
		
		//get user input
		numberInCenti = input.nextInt();
		
		
		
		/*
		double feetInInches = 2.54*12;
		
		double numberOfFeet= numberInCenti/feetInInches;
		double numberOfInches = (numberInCenti%feetInInches)/2.54;
		
		*/
		// ABLE TO USE "int" IF NOT PUT DECIMALS IN THE EQUATION
		int numberInInch = numberInCenti*100/254;
		int numberOfFeet = numberInInch/12;
		int numberOfInches = numberInInch%12;
		
		
		
		System.out.println  (numberInCenti + " centimetres equals " + numberOfFeet +" feet and "+ numberOfInches + " inches");

	} // end of main
	
}// end of class
