Calculadora

Páginas: 2 (412 palabras) Publicado: 20 de mayo de 2010
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
{
bool operacion = true;
double valor1, valor2, resultado;
string alma;
publicForm1()
{
InitializeComponent();
}

private void ventanas_TextChanged(object sender, EventArgs e)
{

}
private void btn1_Click(objectsender, EventArgs e)
{
if (operacion)
{
ventanas.Text = "";
ventanas.Text = "1";
operacion = false;
}else {
ventanas.Text = ventanas.Text + "1";
}
}

private void btn2_Click(object sender, EventArgs e)
{
if(operacion)
{
ventanas.Text = "";
ventanas.Text = "2";
operacion = false;

}
else
{ventanas.Text = ventanas.Text + "2";
}
}
private void btn3_Click(object sender, EventArgs e)
{
if (operacion)
{ventanas.Text = "";
ventanas.Text = "3";
operacion = false;
}
else
{
ventanas.Text = ventanas.Text + "3";}
}
private void btn4_Click(object sender, EventArgs e)
{
if (operacion)
{
ventanas.Text = "";
ventanas.Text ="4";
operacion = false;
}
else
{
ventanas.Text = ventanas.Text + "4";
}
}

private void...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Calculo
  • Calculo
  • Calculos
  • Calculo
  • Calculo
  • Calculo
  • Calculo
  • Calculo

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS