viernes, 16 de octubre de 2009

PRACTICA 6.2A

FLUJO

CONSOLA

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practica_6._2A_cosnsole
{
class Program
{
static void Main(string[] args)
{
double x, y;
Console.WriteLine("\t\tfuncion matematica");
Console.WriteLine("\nvalor de x \t\tvalor de y");
for (x = 1; x <= 10; x = x + 0.2) { y = 3 * Math.Pow(x, 5) + 2 * Math.Pow(x, 3) + x; Console.WriteLine("{0} \t\t\t{1} ", x, y); } Console.ReadLine(); } } }
WINDOWS




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 practica_6._2A_windows
{
public partial class Form1 : Form
{
double x, y;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
double x, y;
listBox1.Items.Add("VALOR DE X \t\tVALOR DE Y");
for (x = 2; x <= 10; x = x + 0.2) { y = 3 * Math.Pow(x, 5) + 2 * Math.Pow(x, 3) + x; listBox1.Items.Add(x.ToString()+ "\t\t" + y.ToString()); } } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { } } }

No hay comentarios:

Publicar un comentario