Calculadora
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...
Regístrate para leer el documento completo.