viernes, 16 de octubre de 2009

practica 5.1 consola



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PRACTICA5._1_CONSOLA
{
class Program
{
static void Main(string[] args)
{
double c, f,incr;
int conv,contador=1;
Console.WriteLine(" introduce la temperatura en grados celsius");
c = double.Parse(Console.ReadLine());
Console.WriteLine(" introduce la cantidad de conversiones

que deseas realizar");
conv = int.Parse(Console.ReadLine());
Console.WriteLine(" introduce los incrementos");
incr = double.Parse(Console.ReadLine());
Console.WriteLine("la temperatura en grados fahrenheit es");
while (contador <= conv)
{
f=(9.0/5.0)* c + 32;
Console.WriteLine("{0} {1}",c,f);
c = c + incr;
contador= contador + 1;

{

miércoles, 14 de octubre de 2009

practica 6.6 consola


Practica 6.6 consola

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace practica_6._6_console
{
class Program
{
static void Main(string[] args)
{
double t, pob;
double A = 1994;

Console.WriteLine("\nAño\t\t\tpoblacion");
for (t = 9; t <= 25; t = t + 1)
{
pob = 4.88 * (1 + Math.Exp(0.02 * t));


Console.WriteLine("\n{0} \t\t\t{1}", A, pob);
A++;
}

Console.ReadLine();
}
}
}

practica 6.5 consola



Practica 6.5 consola

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace practica_6._5_console
{
class Program
{
static void Main(string[] args)
{
double t, y;

Console.WriteLine("\t\tfuncion matematica");
Console.WriteLine("\nvalor de t \t\tvalor de y");
for (t = 5; t <= 10; t = t + 0.5)
{
y = 2*Math.Exp(0.8 * t);
Console.WriteLine("{0} \t\t\t{1} ", t, y);
}

Console.ReadLine();
}
}

practica 6.4 consola



Pracrica 6.4 consola
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace practica_6._4_console
{
class Program
{
static void Main(string[] args)
{
double x, y;
Console.WriteLine("\t\tfuncion matematica");
Console.WriteLine("\nvalor de x t\t\tvalor de y");
for (x = 1; x <= 5; x = x + 0.1)
{
y = 1.0 + x + Math.Pow(x, 2) / 2.0 + Math.Pow(x, 3) / 6.0 + Math.Pow(x, 4)/24.0;
Console.WriteLine("{0} \t\t\t{1} ", x, y);
}

Console.ReadLine();
}
}
}

practica 6.3 consola



Practica 6.3 consola
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace practica_6._3_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();
}
}
}