mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-17 04:51:58 -05:00
start:java8
This commit is contained in:
14
com/study/demo/test2_1.java
Normal file
14
com/study/demo/test2_1.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user