elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 02:03  


Tema destacado: Grupo de Facebook de elhacker.net

+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General (Moderador: Littlehorse)
| | |-+  Pascal (Matriz 30x2)
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Pascal (Matriz 30x2)  (Leído 593 veces)
cacacolass

Desconectado Desconectado

Mensajes: 15


Ver Perfil
Pascal (Matriz 30x2)
« en: 4 Noviembre 2011, 01:11 »

Hola, tengo un pequeño problemita.
Este es mi código:
Código:
program tp6_4;
uses crt,dos;
type wtf=array [1..30,1..2] of integer;
var matriz:wtf;

procedure fill (var matriz:wtf);
var i:integer;
begin
randomize;
    for i:=1 to 30 do
       begin
            matriz [i,1]:=random(10)-4;
            matriz [i,2]:=random(35)+1;
       end;
end;


procedure show (var matriz:wtf);
var i:integer;
begin
     for i:=1 to 30 do
        begin
             writeln;

                     write ('                 Dia :',(i):5,'         Minima :', matriz [i,1]:5,'         Maxima: ', matriz [i,2]:5);

         end;
end;

procedure calculations (matriz:wtf);
var i,j,minima,maxima,temptotal:integer;
    promedio:real;

begin
minima:=0;
maxima:=0;
temptotal:=matriz[i,1]+matriz[i,2];
promedio:=temptotal/30;

for i:=1 to 30 do
   begin
        if matriz[i,1] < minima then
           minima:=matriz[i,1];
        if matriz[i,2] > maxima then
           maxima:=matriz[i,2];
    end;

writeln;
writeln;
writeln;
writeln ('Temperatura minima del mes: ',minima);
writeln ('Temperatura maxima del mes: ',maxima);
writeln ('Temperatura promedio del mes: ',promedio:8:2);
end;


//begin program
begin
delay(30);
clrscr;
writeln;
writeln (' --------------------------------------------------------------------------------------- ');
writeln ('| MEDICIONES DE TEMPERATURAS MAXIMAS Y MINIMAS CORRESPONDIENTES A LOS 30 DIAS DE UN MES |');
writeln (' --------------------------------------------------------------------------------------- ');
writeln;
fill (matriz);
show (matriz);
calculations (matriz);
readkey;
end.

El problema que tengo, es que al ejecutarlo con Windows, no se ve el programa completo.
Me muestra "i" de 12 para abajo, lo que va haciendo lo borra...
Cómo hago para que eso no pase?
Gracias

P.D: Tengo Win 7 x86
Lo probé con Linux y se ve completo, en windows no.


« Última modificación: 4 Noviembre 2011, 01:21 por cacacolass » En línea
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Procedimiento matriz simetrica pascal
Programación General
Bretuor 2 1,661 Último mensaje 14 Enero 2006, 11:01
por Bretuor
Pascal: Buscar en una matriz.
Ejercicios
Traspuesto 2 3,736 Último mensaje 21 Abril 2008, 23:21
por barbate
Duda - Buscar si existe una matriz dentro de otra matriz
Programación Visual Basic
EddyW 2 1,875 Último mensaje 14 Agosto 2010, 06:18
por EddyW
Matriz Dentro de otra matriz
Programación Visual Basic
moba741120 3 1,629 Último mensaje 13 Abril 2011, 18:29
por raul338
matriz « 1 2 »
Programación C/C++
;c1v!c 15 817 Último mensaje 19 Agosto 2011, 17:35
por rir3760
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines