
/*********************************************************************
* Demonstrates math function calls
*
* @author Nancy Harris
* @version  09/12/09
**********************************************************************/
public class MathPlay
{
   /***************************************************************
   * main method for a program that calculates the miles per gallon
   * @param args unused in this program  
	****************************************************************/
   public static void main (String[] args)
   {
		// declarations
		double original;
		double result;
      int    iOriginal;
      int    iResult;
		
      original = 25.32;
      
      // floating point
      
      result = Math.abs(original);
      System.out.println("The absolute value of " + original + " is " + result);
      
      result = Math.sqrt(original);
      System.out.println("The square root of " + original + " is " + result);
      
      result = Math.pow(original, 2);
      System.out.println("The square of " + original + " is " + result);
      
      // now integer
      iOriginal = 25;
            
//      iResult = Math.abs(iOriginal);
//      System.out.println("The absolute value of " + iOriginal + " is " + iResult);
      
//      iResult = Math.sqrt(iOriginal);
//      System.out.println("The square root of " + iOriginal + " is " + iResult);
      
//      iResult = Math.pow(iOriginal, 2);
//      System.out.println("The square of " + iOriginal + " is " + iResult);

   }
}
