package com.calebfontenot.lab3_1_calebfontenot;

import java.util.Scanner;

/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */

/**
 *
 * @author caleb
 */
public class RunwayLength {
    public static void main(String[] args)
    {
        
        //Define data objects
        double length;
        double acceleration;
        double velocity;
        
        //Create scanner
        Scanner input = new Scanner(System.in);
        
        //Prompt for input
        System.out.print("Enter velocity: ");
        velocity = input.nextDouble();
        System.out.print("Enter acceleration: ");
        acceleration = input.nextDouble();
        
        //Calculate
        length = Math.pow(velocity, 2) / (2 * acceleration);
        
        //Print calculation
        System.out.println("The minimum runway length for this airplane is "+length);
    }
}
