viernes, 11 de septiembre de 2009

PRACTICA 2-1 WINDOWS

PRACTICA 2-1 WINDOWS


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace practica2._1windows
{
public partial class Form1 : Form
{
int n,m,p,rs;
public Form1()
{
n=m=p=rs=0;
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
n = int.Parse(textBox1.Text);
m = int.Parse(textBox1.Text);
p = int.Parse(textBox1.Text);
rs = m * 56 + n * 33 + p * 15;
label4.Text="LA RESISTENCIA TOTAL EN SERIE ES " + rs.ToString();
}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
}

private void button3_Click(object sender, EventArgs e)
{
Close();
}

private void Form1_Load(object sender, EventArgs e)
{

}
}
}

No hay comentarios:

Publicar un comentario