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 WindowsFormsApp22 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string wyraz1 = (t1.Text); int dlugosc1 = wyraz1.Length; string wyraz2 = (t2.Text); int dlugosc2 = wyraz2.Length; if (dlugosc1 == dlugosc2) { MessageBox.Show("wyrazy są takie same"); } else { MessageBox.Show("Jeden wyraz jest " + "dłuszszy od drugiego o " + Math.Abs(dlugosc1 - dlugosc2 ) + " znaki."); } } } }