
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 WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
label2 = double.Parse(textBox1.Text);
label3 = double.Parse(textBox2.Text);
label4 = double.Parse(textBox3.Text);
listBox1.Items.Add("Celsius Fahrenheit");
valorI = label2;
while (valorI <= label3)
{
Fah = (9.0 / 5.0) * valorI + 32;
listBox1.Items.Add(valorI.ToString() + "\t = " + Fah.ToString());
valorI = valorI + label4;
}
}
private void button2_Click(object sender, EventArgs e)
{listBox1.Items.Clear();
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
}
}

No hay comentarios:
Publicar un comentario