Search:

Submit Article

# Program to calculate the frequency for different values of C starting from 0.01 to 0.1 in steps of 0.01

Posted By: Easy Tutor     Category: Java     Views: 7079

## Code for Program to calculate the frequency for different values of C starting from 0.01 to 0.1 in steps of 0.01 in Java

```import java.io.*;
import java.lang.Math;

class frequency
{
publicstaticvoid main(String args[])
{
int i;
float L,R,frequency,C;
String str;
try{
System.out.print("Enter value of Inductance(L) :  ");
System.out.flush();
L=Float.parseFloat(str);
System.out.print("Enter value of Resistance(R) :  ");
System.out.flush();
R=Float.parseFloat(str);
System.out.println("     C              Frequency");
System.out.println("==========         ===========");
for(C=0.01f,i=1;i<=10;i++,C=C+0.01f)
{
frequency=(float)(Math.sqrt((1/L*C)-((R*R)-(4*C*C))));
System.out.println("      "+C+"              "+frequency);
}
}
catch(Exception e) {}
}
}
```
Share:

 Easy Tutor author of Program to calculate the frequency for different values of C starting from 0.01 to 0.1 in steps of 0.01 is from United States. Easy Tutor says Hello Friends,I am Free Lance Tutor, who helped student in completing their homework. I have 4 Years of hands on experience on helping student in completing their homework. I also guide them in doing their final year projects.I have share many programs on this website for everyone to use freely, if you need further assistance, than please contact me on easytutor.2ya [at the rate] gmail [dot] comI have special discount scheme for providing tutor services. I am providing tutor service to students from various contries, currently most of my students are from United States, India, Australia, Pakistan, Germany, UK and Canada. I am also here to expand my technical network to receive more opportunity in my career, make friends to help them in resolving their technical problem, learn and share my knowledge, If you like to be my friend, Please send me friend request.Thanks,Happy Programming :) View All Articles

 Please enter your CommentComment should be atleast 30 Characters.Please put code inside [Code] your code [/Code]. No Comment Found, Be the First to post comment!