using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

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

        private string Kiir(double val)
        {
            if (val > 0.5 && val <= 1.5)
            {
                return "Ittaság";
            } else if (val > 1.5 && val <= 2.5)
            {
                return "Részegség";
            } else if (val > 2.5 && val <= 4.0)
            {
                return "Alkoholmérgezés";
            } else if (val <= 0.5)
            {
                return "Józanság";
            } else
            {
                return "Halott";
            }

        }
        private void button1_Click(object sender, EventArgs e)
        {
            double val = Convert.ToDouble(textBox1.Text);
            label3.Text = Kiir(val);
        }
    }
}
