start:java8

This commit is contained in:
dichgrem
2025-10-30 14:30:50 +08:00
parent 3d166ec578
commit af1ea3e24e
21 changed files with 303 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
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);
}
}