PSEUDOCODIGOS
A)
Inicio
Real x,y
Print("funcion Matematica")
Print ("valores x valores y ")
for(x=2 to 10) step 0.2
{
y= 3* x ^5 + 2 * x ^3 + x
Print (x y )
}
FIN
B)
Inicio
Real x,y
Print("funcion Matematica")
Print ("valores x valores y ")
for(x=1 to 5) step 0.1
{
y=1 + x + x^2/ 2.0 + x^3 /6.0 + x^4 /24.0
Print (x y )
}
FIN
C)
Inicio
Real t,y
Print("funcion Matematica")
Print ("valores t valores y ")
for(x=2 to 10) step 0.2
{
y= 2 * Exp( 0.8 * t )
Print (t y )
}
FIN
CODIGO EN CONSOLA
A)
static void Main(string[] args)
{double x=0.0,y;
for (x = 1; x <= 10;x = x + 2.0 / 10.0 )
{
y = 3 * Math.Pow(x, 5) + 2 * Math.Pow(x, 3) + x;
Console.WriteLine(x + " 3x^5 + 2x ^3 + x = " + y);
}
Console.ReadLine();
}
B)
static void Main(string[] args)
{
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 ;
Console.WriteLine(x + " 1.0 + x + x^2/2.0 + x^3/6.0 + x^4/24 = " + y);
}
Console.ReadLine();
}
C)
static void Main(string[] args)
{ double t=0.0,y;
for (t = 5; t <= 10;t = t + 0.5 )
{
y = 2 * Math.Exp(0.8 * t);
Console.WriteLine(t + " 2e^(0.8*t) " + y);
}
Console.ReadLine();
}
WINDOWS
en windows nada mas e cambia el consola por un listbox.items.add
por ejemplo
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 + " 2e^(0.8*t) " + y);
}
A)
B)
C)

No hay comentarios:
Publicar un comentario