diff --git a/GUI/GuessForm.cs b/GUI/GuessForm.cs index df20db8..bacf220 100644 --- a/GUI/GuessForm.cs +++ b/GUI/GuessForm.cs @@ -79,6 +79,7 @@ namespace ProgLab1.GUI { input.BackColor = SystemColors.Window; double inputNum = double.Parse(input.Text); + Console.WriteLine(Math.Abs(answer - inputNum)); if (Math.Abs(answer - inputNum) < 0.1) { @@ -87,6 +88,11 @@ namespace ProgLab1.GUI { tryes--; } + + if(tryes <= 0) + { + this.Close(); + } } tryCount.Text = $"Количество попыток: {tryes}";