Відповідь:
Вроде бы правильно
Пояснення:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
string a = textBox4.Text;
string b = textBox5.Text;
string c = textBox6.Text;
textBox7.Text = rc.rangecheck(a, b, c);
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
public class rc //класс
{
public rc(string a, string b, string c) //конструктор
{
}
public static string rangecheck(string a, string b, string c) //метод
{
float f = Convert.ToSingle(a);
float s = Convert.ToSingle(b);
float g = Convert.ToSingle(c);
if (g >= f && g < s)
{
return "Входит в интервал!";
}
else
{
return "Не входит в интервал!";
}
}
}