Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static final double G_POWER = 9.8;
- public static void main(String[] args)
- {
- int time = 1;
- for (int i = 0; i <= 10; i++)
- {
- System.out.println(fallingDistance(time));
- time++;
- }
- }
- public static double fallingDistance(int time)
- {
- return G_POWER * Math.pow(time, 2) * 1/2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment