using System.Collections.Generic;using System.ComponentModel;
using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Practica_3_Windows_Problema_2{public partial class Form1 : Form{public Form1(){InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int h, w;h = int.Parse(textBox1.Text);
w = int.Parse(textBox2.Text);
int Ar = h * w;int Pe = 2 * (h + w);
textBox3.Text = Ar.ToString();
textBox4.Text = Pe.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox1.Focus();
}

No hay comentarios:
Publicar un comentario