Added haromszog, szokoev, szonda
This commit is contained in:
46
20240304/Haromszog/Form1.cs
Normal file
46
20240304/Haromszog/Form1.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
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ő";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user