lunes, 28 de septiembre de 2009

Practica 4.3 Visual





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 practica_4._3_windows
{
public partial class Form1 : Form
{
double celsius, f;
public Form1()
{
celsius = -10;
f = 0;
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Add("celcius fahrenheit");
while (celsius <>
{
f = (90.0 / 5.0) * celsius + 32.0;
listBox1.Items.Add(celsius.ToString() + " " + f.ToString());
celsius = celsius + 10.0;
}
}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();

listBox1.Items.Clear();
}
}
}

No hay comentarios:

Publicar un comentario