lunes, 28 de septiembre de 2009

Practica 2.1 Visual



using System;

usingSystem.Collections.Generic;

usingSystem.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

usingSystem.Windows.Forms;

namespaceWindows2_1_practica_2

{

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(textBox2.Text);

p = int.Parse(textBox3.Text);

rs = n * 56 + m * 33 + p * 15;

textBox4.Text = "la Resistencia Total En serie es:" + rs.ToString();

}

private void button3_Click(object sender, EventArgs e)

{

Close();

}

private void button2_Click(object sender, EventArgs e)

{

textBox1.Clear();

textBox2.Clear();

textBox3.Clear();

textBox4.Clear();

}

}

}

No hay comentarios:

Publicar un comentario