Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- *
- * @author Esc
- */
- public class lentorata {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- System.out.println("Lähtönopeus");
- double v = Double.parseDouble(sc.nextLine());
- System.out.println("Lähtökulma");
- double a = Double.parseDouble(sc.nextLine());
- //double x = t * v * Math.cos(a);
- double g = 9.81;
- //double y = -((g * t * t)/2) + t * v * Math.sin(a);
- double t = ((g / 2) / Math.sin(Math.toRadians(a))) / v;
- double ttrue = t / (t * t);
- System.out.println(ttrue);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement