20090930

PRACTICA 4.3 TABLA DE GRADOS A FAHREHEIT (visual)





EJECUTABLE DE FORMA VISUAL PARA LA TALA DE CONVERSIONDE GRADOS.

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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
double celcius, f;
celcius = -10;
listBox1.Items.Add(" Celcius Fahrenheit ");
while (celcius <= 60.0) { f = (9.0 / 5.0) * celcius + 32; listBox1.Items.Add("celcius " + celcius.ToString() + " = " + f.ToString() + " grados fahrenheit "); celcius = celcius + 10.0; }
}
private void button2_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
}
}
}

No hay comentarios:

Publicar un comentario