mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 12:41:58 -05:00
15 lines
348 B
Java
15 lines
348 B
Java
package com.study.demo;
|
|
import java.util.Scanner;
|
|
|
|
public class test4 {
|
|
public static void main(String[] args) {
|
|
Scanner sc = new Scanner(System.in);
|
|
double r1 = sc.nextDouble();
|
|
double r2 = sc.nextDouble();
|
|
sc.close();
|
|
|
|
double R = 1 / (1 / r1 + 1 / r2);
|
|
System.out.printf("%.2f\n", R);
|
|
}
|
|
}
|