lunes, 1 de marzo de 2010

practica 6

Practica 6_1

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int opcion;
do
{

double area = 0, perimetro = 0, lado = 0,lado1=0,lado2=0,lado3=0, ancho = 0, largo = 0, radio = 0,dma=0,dme=0;
Console.WriteLine("Opciones a elegir");
Console.WriteLine("Calculo de area y perimetro");
Console.WriteLine("\t1)cuadrado\n\t2)Rectangulo\n\t3)Circulo\n\t4)traingulo\n\t5)rombo");
Console.WriteLine("elegir opcion (1-5): ");
opcion = int.Parse(Console.ReadLine());
switch (opcion)
{
case 0: Console.WriteLine("fin de programa");
Console.BackgroundColor=ConsoleColor.Yellow;

break;
case 1: Console.Clear();

Console.Write("\tCalculo area y perimetro de un cuadrado");
Console.Write("Introduce valor de lado");
lado = double.Parse(Console.ReadLine());
area = lado * lado;
perimetro = lado * 4;
break;
case 2: Console.Clear();

Console.WriteLine("\tCalculo area y perimetro de un rectangulo");
Console.Write("Introduce valor de largo : ");
largo = double.Parse(Console.ReadLine());
Console.Write("\tIntroduce valor de ancho : ");
ancho = double.Parse(Console.ReadLine());
area = largo * ancho;
perimetro = 2 * (largo + ancho);
break;
case 3: Console.Clear();
Console.WriteLine("\tcalculo area y perimetro de un circulo");
Console.Write("introduce el valor del radio ");
radio = double.Parse(Console.ReadLine());

area = Math.PI * Math.Pow(radio, 2);
perimetro = 2 * radio * Math.PI;
break;
case 4: Console.Clear();
Console.WriteLine("\tcalculo area y perimetro de un triangulo");
Console.Write("introduce valor del lado 1 ");
lado1 = double.Parse(Console.ReadLine());
Console.Write("Introduce valor del lado 2 ");
lado2 = double.Parse(Console.ReadLine());
Console.WriteLine("introduce valor del lado 3 ");

lado3 = double.Parse(Console.ReadLine());
double p = (lado1 + lado2 + lado3) / 2;


area = Math.Sqrt(p*(p-lado1)*(p-lado2)*(p-lado3));
perimetro = lado1 + lado2 + lado3;
break;

default:
Console.WriteLine("presiono opcion equivocada ");
break;
case 5 :
Console.Clear();
Console.WriteLine("area perimetro de un rombo ");
Console.Write("introduce valor del diagonal menor");
dme = double.Parse(Console.ReadLine());
Console.WriteLine("introduce valor del diagonal mayor ");
dma = double.Parse(Console.ReadLine());
area = (dma * dme) / 2;
perimetro =4*dme;
break;

}
Console.WriteLine("area={0:f2} perimetro={1:f2}", area, perimetro);
Console.ReadKey();

}
while (opcion != 0);
Console.ReadKey();


}
}
}
Practica 6_1
sing 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 label1_Click(object sender, EventArgs e)
{

}


private void button1_Click(object sender, EventArgs e)
{ double clado1 = 0 ;

double carea = 0;
double cperimetro = 0;

clado1 = double.Parse(textBox1.Text);
carea = Math.Pow(clado1,2);
cperimetro = clado1 * 4;
label2.Text = ("Area: ") + carea;
label3.Text = ("Perimetro: ") + cperimetro;

double rancho = 0;
double rlargo = 0;
double rarea = 0;
double rperimetro = 0;
rlargo = double.Parse(textBox2.Text);
rancho = double.Parse(textBox3.Text);
rarea = rancho * rlargo ;
rperimetro = 2 * rlargo + 2 * rancho;
label9.Text = ("Area: ") + rarea;
label8.Text = ("Perimetro: ") + rperimetro;


double tlado = 0;
double tbase = 0;
double taltura = 0;
double tarea = 0;
double tperimetro = 0;
tlado = double.Parse(textBox4.Text);
taltura = double.Parse(textBox5.Text);
tbase = double.Parse(textBox6.Text);
tarea = tbase * taltura / 2;
tperimetro = tbase + tlado + tlado;
label14.Text = ("Area: ") + tarea;
label15.Text = ("Perimetro: ") + tperimetro;


double ciradio = 0;
double ciarea = 0;
double ciperimetro = 0;
ciradio = double.Parse(textBox7.Text);
ciarea = 3.1416* Math.Pow(ciradio,2);
ciperimetro = 2*3.1416*ciradio;
label18.Text = ("Area: ") +ciarea;
label19.Text = ("perimetro") +ciperimetro;

double rolado =0;
double rodiagonalma =0;
double rodiagonalme =0;
double roarea = 0;
double roperimetro = 0;
rolado = double.Parse(textBox8.Text);
rodiagonalma = double.Parse(textBox9.Text);
rodiagonalme = double.Parse(textBox10.Text);
roarea = rodiagonalma * rodiagonalme / 2;
roperimetro = 4 * rolado;
label24.Text = ("Area: ") + roarea;
label25.Text = ("Perimetro:") + roperimetro;



6_1Pseudocodigo
1. Definir variables int opcion;
do
{

double area = 0, perimetro = 0, lado = 0,lado1=0,lado2=0,lado3=0, ancho = 0, largo = 0, radio = 0,dma=0,dme=0;
Print"Opciones a elegir";
Print"Calculo de area y perimetro";
Print"t1)cuadrado2)Rectangulo3)Circulo4)traingulo5)rombo";
Print"elegir opcion (1-5): ";
Read opcion;
switch (opcion)
{
case 0: Print"fin de programa";


break;
case 1:

Print"Calculo area y perimetro de un cuadrado";
Print"Introduce valor de lado";
Read lado;
area = lado * lado;
perimetro = lado * 4;
break;
case 2:

Print"Calculo area y perimetro de un rectangulo";
Print"Introduce valor de largo : ";
Read largo;
Print"Introduce valor de ancho : ";
Read ancho:
area = largo * ancho;
perimetro = 2 * (largo + ancho);
break;
case 3:
Print"tcalculo area y perimetro de un circulo";
Print"introduce el valor del radio ";
Read radio

area = Math.PI * Math.Pow(radio, 2);
perimetro = 2 * radio * Math.PI;
break;
case 4:
Print"calculo area y perimetro de un triangulo";
Print"introduce valor del lado 1 ";
read lado1
Print"Introduce valor del lado 2 ";
Read lado 2;
Print"introduce valor del lado 3 ";

Read lado 3
double p = (lado1 + lado2 + lado3) / 2;


area = Math.Sqrt(p*(p-lado1)*(p-lado2)*(p-lado3));
perimetro = lado1 + lado2 + lado3;
break;

default:
Print"presiono opcion equivocada ";
break;
case 5 :

Print"area perimetro de un rombo ";
Print"introduce valor del diagonal menor");
Read dm3
Print"introduce valor del diagonal mayor ";
Read dma;
area = (dma * dme) / 2;
perimetro =4*dme;
break;

}
Print"area= perimetro=", area, perimetro);


}
while (opcion != 0);

Practica 6_2

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{

class Program
{
static void Main(string[] args)
{


double franco = 0, libra = 1.84, dracmas = 0, florines = 0, dolar = 1.06, dc = 0, dn = 0, conversion = 0, c2 = 0;
string Opcion;
do {


Console.WriteLine("seleccione Opcion");
Console.WriteLine("Selecciones el tipo de moneda");
Console.WriteLine("\ta)Florines Holandeses a dolares canadienses\n\tb)Dracmas griegas a dolar americano\n\tc)Dolar canadienses a libras britanicas\n\td)Dolares norteamericanos a francos franceses");
Opcion = Console.ReadLine();
switch (Opcion)
{

case "a": Console.Clear();
Console.WriteLine("Introduce la cantidad florines");
florines = double.Parse(Console.ReadLine());
conversion = florines * 43.20 / 100;
Console.WriteLine("Total de dolares canadienses ={0:f2} " , conversion);

Console.ReadKey();
Console.Clear();

break;
case "b": Console.Clear();
Console.WriteLine("Introduce la cantidad de dracmas griegas");
dracmas = double.Parse(Console.ReadLine());
conversion = (dracmas * 2.95 / 100) / dolar;
Console.WriteLine("total de dolares norteamericanos={0:f2}" , conversion);
Console.ReadKey();
Console.Clear();
break;
case "c": Console.Clear();
Console.WriteLine("Introduce la cantidad en dolares");
dc= double.Parse(Console.ReadLine());
conversion = dc / libra;
Console.WriteLine("total de libras ={0:f2}" , conversion);
Console.ReadKey();
Console.Clear();

break;
case "d": Console.Clear();
Console.WriteLine("Introduce la cantidad en dolares");
dn = double.Parse(Console.ReadLine());
conversion = dn * dolar;
c2 = conversion*100/21.55;

Console.WriteLine("total de francos ={0:f2}", c2);
Console.ReadKey();
Console.Clear();

break;
case "F":
case "f": Console.WriteLine("Opcion equivocada");
break;





}

}
while (Opcion != "f" && Opcion != "F") ;


}
}
}

Practica 6_2visual

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
{
florines f;
dracmas d;
dolares_canadienses dc;
dolares_americanos da;
public Form1()
{
InitializeComponent();
f = new florines();
d = new dracmas();
dc = new dolares_canadienses();
da = new dolares_americanos();
}

private void button1_Click(object sender, EventArgs e)
{
f.Show();
}

private void button2_Click(object sender, EventArgs e)
{
d.Show();
}

private void button3_Click(object sender, EventArgs e)
{
dc.Show();
}

private void button4_Click(object sender, EventArgs e)
{
da.Show();
}
}
}

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 dolares_americanos : Form
{
public double t, total, cantidad;
public dolares_americanos()
{
InitializeComponent();
t = total = cantidad = 0;
}

private void button1_Click(object sender, EventArgs e)
{
cantidad = double.Parse(Console.ReadLine());
t = cantidad * 1.06;
total = (t * 100) / 21.55;
label2.Text = "total" + total;
}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
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 dolares_canadienses : Form
{
public double cantidad, total;
public dolares_canadienses()
{
InitializeComponent();
total = cantidad = 0;
}

private void button1_Click(object sender, EventArgs e)
{
cantidad = double.Parse(textBox1.Text);
total = cantidad / 1.84;
label2.Text = "total" + total;

}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
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 dolares_canadienses : Form
{
public double cantidad, total;
public dolares_canadienses()
{
InitializeComponent();
total = cantidad = 0;
}

private void button1_Click(object sender, EventArgs e)
{
cantidad = double.Parse(textBox1.Text);
total = cantidad / 1.84;
label2.Text = "total" + total;

}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
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 dolares_canadienses : Form
{
public double cantidad, total;
public dolares_canadienses()
{
InitializeComponent();
total = cantidad = 0;
}

private void button1_Click(object sender, EventArgs e)
{
cantidad = double.Parse(textBox1.Text);
total = cantidad / 1.84;
label2.Text = "total" + total;

}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}

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 dracmas : Form
{

public double cantidad, total,t;
public dracmas()
{
InitializeComponent();
total = cantidad =t= 0;
}

private void label1_Click(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
cantidad = double.Parse(textBox1.Text);
t = (cantidad * 2.95) / 100;
total = t * 1.06;
label2.Text = "total" + total;


}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
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 florines : Form
{
public double total, cantidad;
public florines()

{
InitializeComponent();
total = cantidad = 0;
}

private void button1_Click(object sender, EventArgs e)
{
cantidad = double.Parse(textBox1.Text);
total = (cantidad * 43.20) / 100;
label2.Text = "total"+ total;
}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
Practica6_2 Pseudocodigo
Declarar variables
double franco = 0, libra = 1.84, dracmas = 0, florines = 0, dolar = 1.06, dc = 0, dn = 0, conversion = 0, c2 = 0;
string Opcion;
do {


Print"seleccione Opcion");
Print"Selecciones el tipo de moneda");
Print"a)Florines Holandeses a dolares canadienses b)Dracmas griegas a dolar americano c)Dolar canadienses a libras britanicas d)Dolares norteamericanos a francos franceses";
Read Opcion
switch (Opcion)
{

case "a":
Print"Introduce la cantidad florines";
Read Florines;
conversion = florines * 43.20 / 100;
Print"Total de dolares canadienses = " , conversion;



break;
case "b":
Print"Introduce la cantidad de dracmas griegas";
Read dracmas;
conversion = (dracmas * 2.95 / 100) / dolar;
Print"total de dolares norteamericanos=" , conversion;

break;
case "c":
Print"Introduce la cantidad en dolares";
Read dc;
conversion = dc / libra;
Print"total de libras =" , conversion;

break;
case "d":
Print"Introduce la cantidad en dolares";
Read dn;
conversion = dn * dolar;
c2 = conversion*100/21.55;

Print"total de francos =", c2;


break;
case "F":
case "f": Print"Opcion equivocada";
break;

Practica 6_3
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace practica_6_problema_3
{
class Program
{
static void Main(string[] args)
{
string tipo;
double celsius=0, grado=0, kelvin=0, rankine=0, fahrenheit=0;
do
{
Console.Clear();
Console.WriteLine("Conversiones de Temperaturas");
Console.WriteLine("\nTipo de grados:");
Console.WriteLine("\n\ta)Fahrenheit\n\tb)Celsius\n\tc)Kelvin\n\td)Rankine\n\te)Salir");
Console.Write("\nElegir el tipo de grado que desea convertir: ");
tipo = Console.ReadLine();
switch (tipo)
{
case "A":
case "a": Console.Clear();
Console.Write("\nIntroducir la cantidad de grados Fahrenheit= ");
grado = double.Parse(Console.ReadLine());
celsius = (5.0 / 9.0) * (grado - 32);
kelvin = celsius + 273;
rankine = grado + 460;
Console.WriteLine("\n\tFahrenheit\tCelsius \tKelvin \tRankine");

Console.WriteLine("\t{0:f2} \t{1:f2} °C \t{2:f2} °K \t{3:f2} °R",grado+ "°F",celsius,kelvin,rankine);
break;

case "B":
case "b": Console.Clear();
Console.Write("\nIntroducir la cantidad de grados Celsius= ");
grado = double.Parse(Console.ReadLine());
fahrenheit = (9.0 / 5.0) * grado + 32.00;
kelvin = grado + 273;
rankine = fahrenheit + 460;

Console.WriteLine("\t{0:f2} °C \t{1:f2} °F \t{2:f2} °K \t{3:f2} °R",grado,fahrenheit,kelvin,rankine);
break;

case "C":
case "c": Console.Clear();
Console.Write("\nIntroducir la cantidad de grados Kelvin= ");
grado = double.Parse(Console.ReadLine());
celsius = grado - 273;
fahrenheit = (9.0 / 5.0) * celsius + 32.00;
rankine = fahrenheit + 460;

Console.WriteLine("\t{0:f2} °K \t{1:f2} °C \t{2:f2} °F \t{3:f2} °R",grado,celsius,fahrenheit,rankine);
break;

case "D":
case "d": Console.Clear();
Console.Write("\nIntroducir la cantidad de grados Rankine= ");
grado = double.Parse(Console.ReadLine());
fahrenheit = grado - 460;
celsius = (5.0 / 9.0) * (fahrenheit - 32.00);
kelvin = celsius + 273;

Console.WriteLine("\t{0:f2} °R \t{1:f2} °F \t{2:f2} °C \t{3:f2} °K",grado,fahrenheit,celsius,kelvin);
break;

case "E":
case "e": Console.WriteLine("Fin del programa");
break;

default:
Console.WriteLine("Presiono la opcion equivocada");
break;
}
Console.ReadKey();

}
while(tipo !="e" && tipo !="E");



}
}
}
Practica 6_3 Pseudocodigo
Declarar variables string tipo;
double celsius=0, grado=0, kelvin=0, rankine=0, fahrenheit=0;
do
{

Print"Conversiones de Temperaturas";
Print"Tipo de grados:";
Print"a)Fahrenheit b)Celsius c)Kelvin d)Rankine e)Salir";
Print"Elegir el tipo de grado que desea convertir: ";
Read Tipo
switch (tipo)
{
case "A":
case "a":
Print"Introducir la cantidad de grados Fahrenheit= ";
Read grado
celsius = (5.0 / 9.0) * (grado - 32);
kelvin = celsius + 273;
rankine = grado + 460;
Print"Fahrenheit Celsius Kelvin Rankine";

Print" {0:f2} {1:f2} °C {2:f2} °K {3:f2} °R",grado+ "°F",celsius,kelvin,rankine;
break;

case "B":
case "b":
Print" Introducir la cantidad de grados Celsius= ";
Read grado
fahrenheit = (9.0 / 5.0) * grado + 32.00;
kelvin = grado + 273;
rankine = fahrenheit + 460;

Print"\t{0:f2} °C \t{1:f2} °F \t{2:f2} °K \t{3:f2} °R",grado,fahrenheit,kelvin,rankine;
break;

case "C":
case "c":
Print"Introducir la cantidad de grados Kelvin= ";
Read grado
celsius = grado - 273;
fahrenheit = (9.0 / 5.0) * celsius + 32.00;
rankine = fahrenheit + 460;

Print"\t{0:f2} °K \t{1:f2} °C \t{2:f2} °F \t{3:f2} °R",grado,celsius,fahrenheit,rankine;
break;

case "D":
case "d":
Print"Introducir la cantidad de grados Rankine= ";
Read grado
fahrenheit = grado - 460;
celsius = (5.0 / 9.0) * (fahrenheit - 32.00);
kelvin = celsius + 273;

Print"\t{0:f2} °R \t{1:f2} °F \t{2:f2} °C \t{3:f2} °K",grado,fahrenheit,celsius,kelvin;
break;

case "E":
case "e": Print"Fin del programa";
break;

default:
Print"Presiono la opcion equivocada");
break;
}


}
while(tipo !="e" && tipo !="E");



Practica 6_3visual
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
{
fahrenheit f;
celsius c;
kelvin k;
rankine r;
public Form1()
{
InitializeComponent();
f = new fahrenheit();
c = new celsius();
k =new kelvin();
r = new rankine();

}

private void button3_Click(object sender, EventArgs e)
{
k.Show();
}

private void button1_Click(object sender, EventArgs e)
{
f.Show();
}

private void button2_Click(object sender, EventArgs e)
{
c.Show();
}

private void button4_Click(object sender, EventArgs e)
{
r.Show();
}
}
}
sing 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 celsius : Form
{
public double grado , kr , rr, fr ;
public celsius()
{
InitializeComponent();
grado = kr = rr= fr = 0;
}

private void button1_Click(object sender, EventArgs e)
{
grado = double.Parse(textBox1.Text);
fr = (9.0 / 5.0) * grado + 32.00;
kr = grado + 273;
rr = fr + 460;
}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
label3.Text = "";
label4.Text = "";
}
}
}
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 fahrenheit : Form
{
public double cr, grado, kr, rr;
public fahrenheit()
{
InitializeComponent();
cr= grado= kr= rr= 0;
}

private void button1_Click(object sender, EventArgs e)
{
grado = double.Parse(textBox1.Text);
cr = (5.0 / 9.0) * (grado - 32);
kr = cr + 273;
rr = grado + 460;
label2.Text = "C"+cr;
label3.Text = "K"+kr;
label4.Text = "R" + rr;

}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
label3.Text = "";
label4.Text = "";

}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
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 kelvin : Form
{
public double cr, grado, kr, rr, fr;
public kelvin()
{
InitializeComponent();
cr= grado = kr = rr = fr = 0;
}

private void button1_Click(object sender, EventArgs e)
{
grado = double.Parse(textBox1.Text);
cr = grado - 273;
fr = (9.0 / 5.0) * cr+ 32.00;
rr= fr + 460;
}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
label3.Text = "";
label4.Text = "";
}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
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 rankine : Form
{
public double cr, grado, kr, rr, fr;
public rankine()
{
InitializeComponent();
cr = grado = kr = rr = fr = 0;
}

private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = "";
label3.Text = "";
label4.Text = "";
}


private void button1_Click(object sender, EventArgs e)
{
grado = double.Parse(textBox1.Text);
fr = grado - 460;
cr = (5.0 / 9.0) * (fr - 32.00);
kr = cr + 273;

}

private void button3_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}

No hay comentarios:

Publicar un comentario