{A ver si esto ayuda}
program ventas;
uses
crt;
type
producto = record
cantidad : integer;
color : string[30];
talla : integer;
end;
cliente = record
nombre : string[40];
apellido : string[120];
direccion : string[200];
pais : string[100];
telefono : string[25];
produc : producto;
end;
const
n = 6;
var
cli : array[1..n] of cliente;
datos : cliente;
i, cont : integer;
sal : boolean;
tec : char;
procedure entre_datos(var d : cliente);
begin
writeln(' ****** Entrada Datos Cliente ******');
writeln;
write(' Nombre = ');
readln(d.nombre);
write(' Apellido = ');
readln(d.apellido);
write(' Direccion = ');
readln(d.direccion);
write(' Pais = ');
readln(d.pais);
write(' Telefono = ');
readln(d.telefono);
end;
procedure entrada_productos(var p : cliente);
begin
writeln;
writeln(' <<<<<< Entrada De Productos >>>>>>');
writeln;
write(' Entre Cantidad = ');
readln(p.produc.cantidad);
write(' Entre Color = ');
readln(p.produc.color);
write(' Entre Talla = ');
readln(p.produc.talla);
end;
begin
cont := 1;
sal := false;
repeat
clrscr;
writeln('Desea Entrar Datos [S/N]');
repeat
tec := upcase(readkey);
until tec in['S','N'];
case tec of
'S' : begin
if cont <= n then
begin
entre_datos(datos);
entrada_productos(datos);
cli[cont] := datos;
if cont < n then
cont := cont + 1;
end
else
begin
writeln(' Fin De Entradas Pulse Una Tecla');
readkey;
sal := true;
end;
end;
'N' : sal := true;
end;
until (cont > n) or (sal = true);
for i := 1 to cont - 1 do
begin
clrscr;
writeln(' Datos Cliente ');
writeln;
writeln(' Nombre : ',cli[i].nombre);
writeln(' apellido : ',cli[i].apellido);
writeln(' Direccion : ',cli[i].direccion);
writeln(' Pais : ',cli[i].pais);
writeln(' Telefono : ',cli[i].telefono);
writeln;
writeln(' Datos Producto ');
writeln;
writeln(' Cantidad : ',cli[i].produc.cantidad);
writeln(' Color : ',cli[i].produc.color);
writeln(' Talla : ',cli[i].produc.talla);
writeln;
writeln(' Pulse Una Tecla');
readkey;
end;
end.