ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Programa de como sacar la media de las estaturas de unos estudiantes


Enviado por   •  22 de Octubre de 2015  •  Tarea  •  625 Palabras (3 Páginas)  •  142 Visitas

Página 1 de 3

program ejer1;

uses

crt;

const

max=100;

type

arr=array[1..max] of real;

var

e:arr;

n,i:integer;

altos,bajos:real;

media,suma:real;

tecla:char;

procedure cuadro;

begin

gotoxy (2,3);

write ('II');

gotoxy (2,4);

write ('II');

gotoxy (2,5);

write ('II');

gotoxy (2,6);

write ('II');

gotoxy (2,7);

write ('II');

gotoxy (2,8);

write ('II');

gotoxy (2,9);

write ('II');

gotoxy (2,10);

write ('II');

gotoxy (2,11);

write ('II');

gotoxy (2,12);

write ('II');

gotoxy (2,13);

write ('II');

gotoxy (2,14);

write ('II');

gotoxy (2,15);

write ('II');

gotoxy (2,16);

write ('II');

gotoxy (2,17);

write ('II');

gotoxy (2,18);

write ('II');

gotoxy (2,19);

write ('II');

gotoxy (2,20);

write ('II');

gotoxy (2,21);

write ('II');

gotoxy (2,22);

write ('II');

gotoxy (2,23);

write ('II');

gotoxy (2,24);

write ('II');

gotoxy (3,2);

write ('------------------------------------------------------------------------------');

gotoxy (3,24);

write ('------------------------------------------------------------------------------');

gotoxy (78,3);

write ('II');

gotoxy (78,4);

write ('II');

gotoxy (78,5);

write ('II');

gotoxy (78,6);

write ('II');

gotoxy (78,7);

write ('II');

gotoxy (78,8);

write ('II');

gotoxy (78,9);

write ('II');

gotoxy (78,10);

write ('II');

gotoxy (78,11);

write ('II');

gotoxy (78,12);

write ('II');

gotoxy (78,13);

write ('II');

gotoxy (78,14);

write ('II');

gotoxy (78,15);

write ('II');

gotoxy (78,16);

write ('II');

gotoxy (78,17);

write ('II');

gotoxy (78,18);

write ('II');

gotoxy (78,19);

write ('II');

gotoxy (78,20);

write ('II');

gotoxy (78,21);

write ('II');

gotoxy (78,22);

write ('II');

gotoxy (78,23);

write ('II');

gotoxy (78,24);

write ('II');

readln;

end;

procedure presione_tecla;

begin

gotoxy (20,23);

textcolor (31);

write ('presione cualquier tecla para continuar');

normvideo;

tecla:=readkey;

gotoxy (20,23);

write (' ');

end;

begin

cuadro;

gotoxy (27,4);

write ('numero de alumnos (1-100)');

repeat

readln (n);

until n<=100;

suma:=0;

for i:=1 to n do

begin

gotoxy (27,5);

write ('escriba las alturas:');

readln (e[i]);

suma:=suma + e[i];

end;

media:=suma/n;

bajos:=0;

altos:=0;

for i:=1 to n do

begin

if e[i]<media then bajos:=bajos + 1

else

altos:=altos + 1;

readln;

gotoxy (27,8);

write ('munero de alumnos', n:3);

gotoxy (27,9);

write ('numero de altos', altos:3);

gotoxy (27,10);

write ('numero de bajos', bajos:3);

gotoxy (27,11);

write ('media de estaturas', media:5:2);

end;

end.

program ejer1;

uses

crt;

const

max=100;

type

arr=array[1..max] of real;

var

e:arr;

n,i:integer;

altos,bajos:real;

media,suma:real;

tecla:char;

procedure cuadro;

begin

gotoxy (2,3);

write ('II');

gotoxy (2,4);

write ('II');

gotoxy (2,5);

write ('II');

gotoxy (2,6);

write ('II');

gotoxy (2,7);

write ('II');

gotoxy (2,8);

write ('II');

gotoxy (2,9);

write ('II');

gotoxy (2,10);

write ('II');

gotoxy (2,11);

write ('II');

gotoxy (2,12);

write ('II');

gotoxy (2,13);

write ('II');

gotoxy (2,14);

write ('II');

gotoxy (2,15);

write ('II');

gotoxy (2,16);

write ('II');

gotoxy (2,17);

write ('II');

gotoxy (2,18);

write ('II');

gotoxy (2,19);

write ('II');

gotoxy (2,20);

write ('II');

gotoxy (2,21);

write ('II');

gotoxy (2,22);

write ('II');

gotoxy (2,23);

write ('II');

gotoxy (2,24);

write ('II');

gotoxy (3,2);

write ('------------------------------------------------------------------------------');

gotoxy (3,24);

write ('------------------------------------------------------------------------------');

gotoxy (78,3);

write ('II');

gotoxy (78,4);

write ('II');

gotoxy (78,5);

write ('II');

gotoxy (78,6);

write ('II');

gotoxy (78,7);

write ('II');

gotoxy (78,8);

write ('II');

gotoxy (78,9);

write ('II');

gotoxy (78,10);

write ('II');

gotoxy (78,11);

write ('II');

gotoxy (78,12);

write ('II');

gotoxy (78,13);

write ('II');

gotoxy (78,14);

write ('II');

gotoxy (78,15);

write ('II');

gotoxy (78,16);

write ('II');

gotoxy (78,17);

...

Descargar como (para miembros actualizados) txt (10 Kb) pdf (51 Kb) docx (19 Kb)
Leer 2 páginas más »
Disponible sólo en Clubensayos.com