Skip to content

Instantly share code, notes, and snippets.

@wikimatze
Created June 12, 2010 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wikimatze/435584 to your computer and use it in GitHub Desktop.
Save wikimatze/435584 to your computer and use it in GitHub Desktop.
var
TheNameEntered : String;
TheNumberEntered : Integer;
ACounterToUse : Integer;
begin
Write( 'Enter your name: ' );
Readln( TheNameEntered );
Write( 'Enter a number between 1 and 20: ' );
Readln( TheNumberEntered );
If( ( TheNumberEntered < 1 ) Or ( TheNumberEntered > 20 ) ) Then
Begin
Writeln( 'The number is not between 1 and 20 ! Program stopped !' );
Exit;
End; { If Then }
{ start doing the stuff }
For ACounterToUse := 1 To TheNumberEntered Do
Begin
Writeln( 'Counter: ', ACounterToUse, ' Name: ', TheNameEntered );
End; { For Do }
Writeln( 'Program is done...' );
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment