Código Delphi
[-]uses SysUtils; {$apptype console}
var
Repeticiones, Cantidad: ShortInt;
Choice: Char;
label Back;
begin
Back: Write(#13'Introduce las longitudes del diagrama de barras a representar: ');
ReadLn(Repeticiones);
while Repeticiones > 0 do
begin
Dec(Repeticiones);
Read(Cantidad);
Write(#9);
if Cantidad > -1 then
Write('I');
while Cantidad > 0 do
begin
Write('*');
Dec(Cantidad);
end;
WriteLn;
end;
Write('¿Deseas representar mas diagramas de barras (S/N): ');
ReadLn(Choice);
if (Choice = 's') or (Choice = 'S') then
goto Back;
end.
Espero tengamos buena puntuacion en el "ejercicio"