namespace Lab3_2_CalebFontenot
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void calculateButton_Click(object sender, EventArgs e)
        {
            double miles;
            double gallons;
            double mpg;

            // Get the miles driven and assign it to
            // the miles variable.
            miles = double.Parse(milesTextBox.Text);

            // Get the miles driven and assign it to
            // the gallons variable.
            gallons = double.Parse(gallonsTextBox.Text);

            // Calculate MPG.
            mpg = miles / gallons;

            // Display the MPG in the mpgLabel control.
            mpgLabel.Text = mpg.ToString();
        }

        private void exitButton_Click(object sender, EventArgs e)
        {
            // Close the form.
            this.Close();
        }
    }
}