domingo, 11 de octubre de 2009

Practica 6.3 Visual b)

Pseudocodigo



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 listBox1_SelectedIndexChanged(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
double x, y;

listBox1.Items.Add(" Valor de X \t\t Valor de Y");

for (x = 1; x <= 5; x = x + 0.1)
{
y = 1 + x + Math.Pow(x, 3) / 6.0 + Math.Pow(x, 4) / 24.0;
listBox1.Items.Add(x.ToString() + "\t\t\t" + y.ToString());
}
}

private void button2_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
}

private void button3_Click(object sender, EventArgs e)
{
Close();
}


}
}

No hay comentarios:

Publicar un comentario