20090930

PRACTICA 4.2 DESPLIEGUE DE CUADRANTE (visual)



PROGRAMA EN EJECUTABLE PARA DESPELGAR UBICACION DE CUADRANTE DEPENDIENDO EL ANGULO.



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)
{
int angulo ;
angulo = int.Parse(textBox1.Text);
switch (angulo)
{
case 0: ;
break;
case 90: textBox2.Text = ("cuadrante 1");
break;
case 180: textBox2.Text = ("cuadrante 2");
break;
case 270: textBox2.Text = ("cuadrante 3");
break;
case 360: textBox2.Text = ("cuadrante 4");
break;
}
}
private void button2_Click_1(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
}
}

No hay comentarios:

Publicar un comentario