PROGRAM Stars (Input,Output);

CONST
   LineLength = 80;    (* Number of characters on screen line *)

VAR
  Count,               (* Loop counter *)
  Value : Integer;     (* User input *)


BEGIN
   Writeln('Input integers, one per line.');
   Writeln('Program will output that number of asterisks per line.');

   WHILE NOT EOF DO       (* Until user enters ctrl-z *)
    Begin
      Readln(Value);

      IF Value < 1 THEN
         Write(Value)         (* echo print integer 0 or less *)
      ELSE
       Begin
         Count := 1;

         (* Display 'Value' number of *'s, but no more than a linefull *)
         WHILE (Count <= Value) AND (Count <= LineLength) DO
          Begin
            Write('*');
            Count := Count + 1
          End

       End;
      Writeln
    End
END.
