20090924

PRACTICA 2.1 CALCULO DE RESISTENCIA TOTAL CIRCUITO SERIE (visual)

CODIGO DE LA PRACTICA 2.1 VISUAL,. A CONTINUACION.


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 WindowsFormsApplication1
{
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 button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();

}

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



}
}



a continuacion el diagrama de flujo ,. que por algunas raones,. no se publico,. pero ya esta aqui ,. es tambien una solucion del ejerccio.



No hay comentarios:

Publicar un comentario