Write a Java code to find the value of v from the expression:(using arguments)1/v = 1/u + 1/f where the values of u and f are entered by the user
Answers
Answered by
4
Answer:
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
double u=s.nextDouble();
double f=s.nextDouble();
double v=(1/u)+(1/f);
System.out.println(1/v);
}
}
Explanation:
Hope this is useful!
Similar questions