public static double getDoublewithinRange(Scanner sc, String prompt,double min, double max)
            
    {
        boolean isValid =false;
        double loanAmount =0;
      
        
        while(isValid==false)
        {
                loanAmount = getDouble(sc,prompt);


            if (loanAmount <=min)
            {
            System.out.println("Error! Number must be greater than "+min);
            isValid=false;
            }

            else if (loanAmount>=max)
            {
               System.out.println("Error! Number must be less than "+max);
               isValid=false;
            }
            else
                isValid= true;
        }
        return loanAmount;
    }