jueves, 15 de octubre de 2009

PRACTICA 6 VALOR DE T, Y

PRACTICA 6 VALOR DE T, Y DE 5 A 10 CON INCREMENTOS DE .5



CONSOLA

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace PRACTICA_6_C_CONSOLA

{

class Program

{

static void Main(string[] args)

{

double T, Y;

Console.WriteLine("FUNCION MATEMATICA");

Console.WriteLine("Valor T Valor Y");

for (T = 5; T <= 10; T = T + 0.5)

{

Y = Math.Pow(2,0.8)*T;

Console.WriteLine("{0} {1}", T, Y);

Console.ReadKey();

}

}

}

}

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 PRAC_6_C_VISUAL

{

public partial class Form1 : Form

{

double T, Y;

public Form1()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{

listBox1.Items.Add("VALOR DE T VALOR DE Y");

for (T = 5; T <= 10; T = T + 0.5)

{

Y = 2 * Math.Exp(0.8 * T);

listBox1.Items.Add(T.ToString() + " \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