ok i think the program should look like this..
program pin; uses crt; var; pin : real; begin writeln ('enter pin here'); read (pin); for pin:= 1 to 9 do write ('*'); writeln (' Your pin is',pin); end.
when i try to wok it doesn;t do what i want it to do, also can some one tell me if you can save the information like write ('enter you name'); readln (name); save the name and then the last name in some sort of data base..
Take a look at theReadKey function.
program pin;
uses
crt;
var
PinNumber: string;
Done: Boolean;
ACharacter: Char;
begin
{ Initialize variables. }
Done := False;
PinNumber := '';
{ Prompt user for input. }
writeln;
write('Enter your pin number: ');
{ Read input. }
repeat
ACharacter := ReadKey;
case ACharacter of
'0'..'9':
begin
write('*');
PinNumber := PinNumber + ACharacter;
end;
else
Done := True;
end;
until Done;
{ Display pin number. }
writeln;
writeln('Your pin number is: ' + PinNumber);
end.