Project Recursive Auxiliary Math Create a project named Recu
Solution
import java.util.*;
 import java.io.*;
class RecursiveAuxiliaryMath{
    public static boolean recIsPalidrome(String num, int i, int j){
        if(i>=j){
            return true;
        }
        else{
            if(num.charAt(i)!=num.charAt(j)){
                return false;
            }
            else{
                recIsPalidrome(num,i+1,j-1);
            }
        }
        return true;
    }
   public static long recFebonacci(int n){
        if(n==0){
            return 0;
        }
        else if(n==1){
            return 1;
        }
        else{
            return recFebonacci(n-1)+recFebonacci(n-2);
        }
    }
   public static int recGCD(int a, int b){
        if(b!=0){
            return recGCD(b,b%a);
        }
        else{
            return a;
        }
    }
   public static double recPowInt(double a, int n){
        if(n==1){
            return a;
        }
        else{
            return recPowInt(a*a,n-1);
        }
    }
}
public class RecursiveAuxiliaryMathDemo{
    public static void main(String[] args){
        int a,b,c,n,p,i,j;
        double x;
        Scanner reader = new Scanner(System.in); // Reading from System.in
       
        //gcd of three numbers
        System.out.println(\"Enter three integers whose GCD is to be found: \");
        a = reader.nextInt();
        b = reader.nextInt();
        c = reader.nextInt();
       int h = recGCD(a,b);
        h = recGCD(h,c);
        // System.out.println(\"gcd (\"+a+\",\"+b+\",\"+c+\") is \"+h);
       //nth fibonacci number
        System.out.println(\"Enter an integer n to find the nth fibonacci number: \");
        n = reader.nextInt();
        m = recFebonacci(n);
       
        // System.out.println(\"fibo(\"+n+\") \"+m);
       
        //x to power p
        System.out.println(\"Enter the base and exponent, an integer, of a power: \");
        x = reader.nextInt();
        p = reader.nextInt();
        q = recPowInt(x,p);
        System.out.println(q);
       
        System.out.println(\"Enter the positive integers i and j where i < j: \");
        i = reader.nextInt();
        j = reader.nextInt();
        int count=0;
        for(int k=i; k<=j; k++){
            if(recIsPalidrome(k)){
                count++;
            }
        }
    }
 }


