lunes, 28 de septiembre de 2009

Practica 3.1 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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
double r, a, v, area;
public Form1()
{
r = a = v = area = 0.0;
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
r = double.Parse(textBox1.Text);
a = double.Parse(textBox2.Text);
v = 3.1416 * r * r * a;
area = 2 * (3.1416 * r * r + 3.1416 * r * a);

textBox3.Text = v.ToString();
textBox4.Text = area.ToString();



}

private void Form1_Load(object sender, EventArgs e)
{

}
}
}

No hay comentarios:

Publicar un comentario