@@ -0,0 +1,2079 @@
+/** The program calculates the exponential function e%5Ex where x is a value%0A *  input by the user of the program.%0A */%0A%0Apackage exponentialfunction;%0A%0Aimport java.util.Scanner;%0A/**%0A *%0A * @author k8port%0A */%0Apublic class ExponentialFunction %7B%0A    %0A    /** Returns the value of the exponential function with the exponent as    %0A     *  the parameter. The function is: 1 + x + x%5E2/2! + x%5E3/3! + ... + x%5En/n!.%0A     *  @param x An integer value x.%0A     *  @param x An integer value n.%0A     *  @return the result of e%5En for .%0A     */ %0A    private static double ExpFx(int x, int n) %7B%0A        int%5B%5D factorial = new int%5Bn%5D;%0A        int%5B%5D exp = new int%5Bn%5D;%0A        int f = 1, e =1;%0A        double result = 1;%0A        for (int i = 1; i %3C= n; i++) %7B%0A            f *= i;%0A            e *= e;%0A            factorial%5Bi-1%5D = f;%0A            exp%5Bi-1%5D = e; %0A        %7D%0A        for (int j = n; j %3E 1; j--) %0A            result += exp%5Bn%5D / factorial%5Bn%5D;%0A        return result;%0A    %7D%0A    %0A    private static final int%5B%5D INPUT = %7B1, 10, 50, 100%7D; %0A    %0A    /**%0A     * @param args the command line arguments%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        %0A        // instance variables%0A        Scanner scan = new Scanner(System.in);%0A        int x; // user input value to solve %0A        String ans; // user input yes or no 'y' or 'n'%0A        boolean go = true; // flag to determine on and off status of program%0A        %0A        // gather data%0A        System.out.println(%22Tool for calculating the exponential function.%22);%0A        do %7B%0A            System.out.println(%22Please input a value x to calculate e%5Ex.%22);%0A            x = scan.nextInt();%0A        %0A            // solve the equation for inputs 1, 10, 50 and 100%0A            for (int i = 0; i %3C INPUT.length; i++) %7B%0A                System.out.println(%22For input of %22 + INPUT%5Bi%5D + %22:%22);%0A                System.out.println(ExpFx(x, INPUT%5Bi%5D));%0A            %7D%0A            System.out.println(%22Would you like to quit? y or n.%22);%0A            ans = scan.next();%0A            if (ans == %22yes%22)%0A                go = false;%0A        %7D while (go);%0A    %0A    %7D%0A%7D%0A

Create ExponentialFunction.java