Calcula Dora Basic A
Calcula Dora Basic A
Calcula Dora Basic A
FORM1.CS
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 CalculadoraBasica
{
public partial class Form1 : Form
{
int operation = 0;
public Form1()
{
InitializeComponent();
}
Loperation.Text = "+";
operation = 3;
}
case 1:
tresultado.Text = Convert.ToString(int.Parse(tnombre1.Text) *
int.Parse(tnombre2.Text));
break;
case 2:
tresultado.Text = Convert.ToString(int.Parse(tnombre1.Text) /
int.Parse(tnombre2.Text));
break;
case 3:
tresultado.Text = Convert.ToString(int.Parse(tnombre1.Text) +
int.Parse(tnombre2.Text));
break;
case 4:
tresultado.Text = Convert.ToString(int.Parse(tnombre1.Text) -
int.Parse(tnombre2.Text));
break;
case 5:
tresultado.Text = Convert.ToString(int.Parse(tnombre1.Text) %
int.Parse(tnombre2.Text));
break;
default:
MessageBox.Show("Ha de seleccionar una operació abans.");
break;
}
}
ComprovarCampo.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CalculadoraBasica
{
class ComprovarCampo
{
}
return res;
}
}
}
Aleix Collado Serrano
Capturas de pantalla