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 numero10
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//Variables
int s = 0, i;
//Arreglos
int[] n = new int[5];
//Entrada
private void textBox1_TextChanged(object sender, EventArgs e)
{
n[0] = int.Parse(textBox1.Text);
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
n[1] = int.Parse(textBox2.Text);
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
n[2] = int.Parse(textBox3.Text);
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
n[3] = int.Parse(textBox4.Text);
}
private void textBox5_TextChanged(object sender, EventArgs e)
{
n[4] = int.Parse(textBox5.Text);
}
//Proceso
private void button1_Click(object sender, EventArgs e)
{
for (i = 0; i <= 4; i++)
s += n[i];
textBox6.Text = s.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
No hay comentarios:
Publicar un comentario
Nota: solo los miembros de este blog pueden publicar comentarios.