elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Tutorial básico de Quickjs


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  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 2,370 veces)
cacacolass

Desconectado Desconectado

Mensajes: 19


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

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 am por cacacolass » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Pascal: Buscar en una matriz.
Ejercicios
Traspuesto 2 8,822 Último mensaje 21 Abril 2008, 23:21 pm
por barbate
matriz c#
.NET (C#, VB.NET, ASP)
shin_akuma 2 10,878 Último mensaje 30 Junio 2008, 22:06 pm
por shin_akuma
Duda - Buscar si existe una matriz dentro de otra matriz
Programación Visual Basic
EddyW 2 5,847 Último mensaje 14 Agosto 2010, 06:18 am
por EddyW
Matriz en C++
Programación C/C++
delirio 2 20,638 Último mensaje 27 Noviembre 2010, 22:48 pm
por darkvidhack
Matriz Dentro de otra matriz
Programación Visual Basic
moba741120 3 6,766 Último mensaje 13 Abril 2011, 18:29 pm
por raul338
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines