ANONYMOUS RESULT :NaN
<pre><code>import java.io.*;

public class frequency
{
    public static void main(String args[])
    {
        String a1, a2, a3;
        double r, l ,c, f;  //r=resistance, l=induction, c=capacitance, f=frequency

        try
        {
            BufferedReader buff=new BufferedReader(new InputStreamReader(System.in));

            System.out.print("Enter the RESISTANCE:");
            a1=buff.readLine();
            r=Double.parseDouble(a1);
            System.out.print("Enter the INDUCTANCE:");
            a2=buff.readLine();
            l=Double.parseDouble(a2);
            System.out.print("Enter the CAPACITANCE:");
            a3=buff.readLine();
            c=Double.parseDouble(a3);

            //for(c=0.01;c&lt;=0.1;c--)
            //{
            f=Math.sqrt((1/l*c) - pow(r,2)/(4*pow(c,2)));
            System.out.print("The FREQUENCY is:"+f);
        }
            //}
        catch(Exception e)
        {}
    }
}
</code></pre>

<p>The above code is to calculate the frequency. The code is executing properly,but the problem is that the result it is showing is something i don't know. It give show the result as "Nan"</p>

<p>plz explain what is thing &amp; !!</p>
