Practica 6-5. Pseudocódigo.
1.-Inicio
T=9 Int
Año=1994 Int
Población=0 double
PrinT”Tabla anual de población”
PrinT”Año población”
For (T=9 to 20 step T= T+1=
{
Poblacion=4.88*(1+exp (0.02*t))
PrinT”Enero de”Año” “, población
Año= Año +1
}
Final
CODIGO EN CONSOLA
static void Main(string[] args)
{
double t = 0.0;
double p;
for (t = 1994; t <=2010; t = t + 1)
{
p=4.8*(1+ Math.Exp(0.02*t));
Console.WriteLine("En el año " + t + " la poblacion era igual a = " + p);
}
Console.ReadLine();
}
.jpg)
CONSOLA EN WINDOWS
double t = 0.0;
double p;
for (t = 1994; t <= 2010; t = t + 1)
{
p = 4.8 * (1 + Math.Exp(0.02 * t));
listBox1.Items.Add("En el año " + t + " la poblacion era igual a = " + p);
}
.jpg)
CODIGO EN CONSOLA
static void Main(string[] args)
{
double t = 0.0;
double p;
for (t = 1994; t <=2010; t = t + 1)
{
p=4.8*(1+ Math.Exp(0.02*t));
Console.WriteLine("En el año " + t + " la poblacion era igual a = " + p);
}
Console.ReadLine();
}
.jpg)
CONSOLA EN WINDOWS
double t = 0.0;
double p;
for (t = 1994; t <= 2010; t = t + 1)
{
p = 4.8 * (1 + Math.Exp(0.02 * t));
listBox1.Items.Add("En el año " + t + " la poblacion era igual a = " + p);
}
.jpg)
No hay comentarios:
Publicar un comentario