Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- public class Solution {
- public static void main(String[] args) throws IOException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- System.out.println("Input the number of seconds with 2 digits after decimal point");
- String z = reader.readLine();
- double t = Double.parseDouble(z);
- float g = 9.81f;
- float h = (float) ((g * t * t) / 2);
- h = Math.round(h * 100.0 / 100.0);
- System.out.println("Depth of well = " + h + " meters");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement