![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvwTOAR0HKz4xZUPbnmkweFKElYU1v4VZoQYw-hzRpHchBe8eTx0esIGg9Yhli6U4qkD_gJijr5GdPcQ8ZGWK29W3l5MbcqtegZbitZeV5vE3MSzz_I5v0OLBB2ULvFc1WgR2VohxcVSZv/s320/Dibujo.bmp)
ESQUEMA DEL PROGRAMA PARA ELA REA Y VOLUMEN DE UN CILINDRO,
ESQUEMA DEL PROPGRAMA 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 radio, altura, volumen, area;
public Form1()
{
InitializeComponent();
radio=altura=volumen=area=0;
}
private void button1_Click(object sender, EventArgs e)
{
radio=double.Parse (textBox1.Text);
altura= double.Parse(textBox2.Text);
volumen=(3.1416*radio*radio*altura);
area=(2*3.14*radio*(altura+radio));
textBox3.Text=("") +volumen.ToString();
textBox4.Text=("")+area.ToString ();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}
No hay comentarios:
Publicar un comentario