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 ejercicio1
{
public partial class ejercicio3 : Form
{
public ejercicio3()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int p, c;
double sub, igv, total;
p = int.Parse(textBox1.Text);
c = int.Parse(textBox2.Text);
sub = p * c;
igv = p * 0.18;
total = sub - igv;
textBox3.Text = sub.ToString();
textBox4.Text = igv.ToString();
textBox5.Text = total.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox5.Text = "";
}
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
No hay comentarios:
Publicar un comentario