ProgaOra/20240304/Haromszog/Form1.cs

47 lines
1.0 KiB
C#
Raw Normal View History

2024-03-04 10:11:08 +00:00
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 Haromszog
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private bool Szerkesztheto(int a, int b, int c)
{
if (a + b > c && a + c > b && b + c > a)
{
return true;
}
return false;
}
private void button1_Click(object sender, EventArgs e)
{
int a = Convert.ToInt32(textBox1.Text);
int b = Convert.ToInt32(textBox2.Text);
int c = Convert.ToInt32(textBox3.Text);
if (Szerkesztheto(a,b,c))
{
label5.Text = "Szerkeszthető";
} else
{
label5.Text = "Nem szerkeszthető";
}
}
}
}