
using System;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
usingSystem.Windows.Forms;
namespaceWindows2_33practica_2
{
public partial class Form1 :Form
{
double costo, costototal;
public Form1()
{
costo = costototal = 0;
InitializeComponent();
}
private voidbutton1_Click(objectsender, EventArgs e)
{
costo =double.Parse(textBox1.Text);
costototal = costo + costo * 0.12 + costo * 0.06;
textBox2.Text = costototal.ToString();
}
private voidbutton2_Click(objectsender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox1.Focus();
}
private voidbutton3_Click(objectsender, EventArgs e)
{
Close();
}
}
}

No hay comentarios:
Publicar un comentario