Project Euler #192: Best Approximations

  • + 0 comments

    help me out

    public static void main(String args[]) 
    

    {
    Scanner in = new Scanner(System.in); int array[]=new int[2]; int m = in.nextInt(); int b = in.nextInt(); int c,d; int sum=0; int j,k;double f,h;

        for(int i=2; i<= m; i++)
        { c=0; d=0;   array[0]=0;array[1]=0; 
               double e=0; h=1.0;
    

    for(k=2; k

    //System.out.println(f); if((f

    } g=f; h=f; //System.out.println(array[1]); }

    }
    

    sum=sum+array[1]; System.out.println(array[0]+"/"+array[1]); } System.out.println("sum="+sum); }}