PRACTICA 8.
Pseudocódigo Practica8 Problema 1.
1.- Inicio.
Pseudocódigo Practica8 Problema 1.
1.- Inicio.
x, y, f real
Print “x y f(x,y)”
for(x=2 to 8 step x=x+2)
{
for(y=6 to 21 step y=y+3)
{
f=((pow(x,2)-pow(y,2))/( pow(x,2)+pow(y,2)))
Print x, “ “, y,” ”, f
}
}
Fin.
Print “x y f(x,y)”
for(x=2 to 8 step x=x+2)
{
for(y=6 to 21 step y=y+3)
{
f=((pow(x,2)-pow(y,2))/( pow(x,2)+pow(y,2)))
Print x, “ “, y,” ”, f
}
}
Fin.
Pseudocódigo Practica8 Problema 2.
1.- Inicio.
x, y, f real
Print “x y f(x,y)”
for(x=-4 to 4 step x=x+1)
{
for(y=-5 to 5 step y=y+1)
{
f=((pow(x,2)-pow(y,2))/( pow(x,2)+pow(y,2)))
if(((pow(x,2)/16)+(pow(y,2)/25))==1)
{
Print x, " ", y, “ “, f
}
}
}
Fin.
1.- Inicio.
x, y, f real
Print “x y f(x,y)”
for(x=-4 to 4 step x=x+1)
{
for(y=-5 to 5 step y=y+1)
{
f=((pow(x,2)-pow(y,2))/( pow(x,2)+pow(y,2)))
if(((pow(x,2)/16)+(pow(y,2)/25))==1)
{
Print x, " ", y, “ “, f
}
}
}
Fin.
Pseudocódigo Practica8 Problema 3.
1.- Inicio.
numero, i, j f real
numero=0
i=0
j=0
do
{
Print “Introduce un numero positivo: "
Read numero
if(numero<0)
{
Print “El numero no es valido. "
}
}
while(numero<0)
{
for ( i=1 to i<=numero step i=i+1)
{
for( j=1 to j<=(numero-(i-1)) step j=j+1)
{
Print "\t"
}
Print “\n”
}
}
Fin.
1.- Inicio.
numero, i, j f real
numero=0
i=0
j=0
do
{
Print “Introduce un numero positivo: "
Read numero
if(numero<0)
{
Print “El numero no es valido. "
}
}
while(numero<0)
{
for ( i=1 to i<=numero step i=i+1)
{
for( j=1 to j<=(numero-(i-1)) step j=j+1)
{
Print "\t"
}
Print “\n”
}
}
Fin.
Pseudocódigo Practica8 Problema 4.
1.-Inicio
n=0, i=0, edad=0, goles=0, asistencia=0,min=0, jugador=0 int
nombre [15] char
altura, peso, f real
eva=0, mayor=0 real
Print “Introduzca numero: ”
read n
for(i=1 to n step i=i++)
{
Print “Nombre: ”
Read nombre
Print “Edad: ”
Read edad
Print “Altura: ”
Read altura
Print “Peso: ”
Read peso
Print “Goles: ”
Read goles
Print “Asistencia: ”
Read asistencia
Print “Minutos: ”
Read minutos
Print “Factor de liga: ”
Read f
eva= ((goles+asistencia-min)/4+(altura+peso)/5-edad)*f
Print "Nombre: ",nombre
Print "Evaluacion: ",eva
if (eva>mayor)
{
mayor=eva
jugador=i
}
}
Print "Jugador con evalucion mayor: ",jugador
Print “Evaluacion: ",mayor
Fin.
n=0, i=0, edad=0, goles=0, asistencia=0,min=0, jugador=0 int
nombre [15] char
altura, peso, f real
eva=0, mayor=0 real
Print “Introduzca numero: ”
read n
for(i=1 to n step i=i++)
{
Print “Nombre: ”
Read nombre
Print “Edad: ”
Read edad
Print “Altura: ”
Read altura
Print “Peso: ”
Read peso
Print “Goles: ”
Read goles
Print “Asistencia: ”
Read asistencia
Print “Minutos: ”
Read minutos
Print “Factor de liga: ”
Read f
eva= ((goles+asistencia-min)/4+(altura+peso)/5-edad)*f
Print "Nombre: ",nombre
Print "Evaluacion: ",eva
if (eva>mayor)
{
mayor=eva
jugador=i
}
}
Print "Jugador con evalucion mayor: ",jugador
Print “Evaluacion: ",mayor
Fin.
No hay comentarios:
Publicar un comentario