A)
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)
{
double x = 0.0, y;
for (x = 1; x <= 5; x = x + 1.0 / 10.0) { y = 1.0 + x + Math.Pow(x, 2) / 2.0 + Math.Pow(x, 3) / 6.0 + Math.Pow(x, 4) / 24;
listBox1.Items.Add(x + " 1.0 + x + x^2/2.0 + x^3/6.0 + x^4/24 = " + y); } } private void button2_Click(object sender, EventArgs e)
{ listBox1.Items.Clear();
} private void button3_Click(object sender, EventArgs e)
{ Close();
} private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { } } }
B)
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)
{
double x = 0.0, y;
for (x = 1; x <= 5; x = x + 1.0 / 10.0) { y = 1.0 + x + Math.Pow(x, 2) / 2.0 + Math.Pow(x, 3) / 6.0 + Math.Pow(x,4) /24 ;
listBox1.Items.Add(x + "\t 1.0 + x + x^2/2.0 + x^3/6.0 + x^4/24 = " + y);
}
}
private void button2_Click(object sender, EventArgs e)
{ listBox1.Items.Clear();
}
private void button3_Click(object sender, EventArgs e)
{Close();
} private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
} } }
C)
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)
{
double t = 0.0, y;
for (t = 5; t <= 10; t = t + 0.5)
{
y = 2 * Math.Exp(0.8 * t);
listBox1.Items.Add(t + "\t 2e^(0.8*t) " + y);
}
}
private void button2_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
No hay comentarios:
Publicar un comentario