Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {You need a file named "TEXT.TXT" contains a paragraph, write in on the same line, don't enter or the program won't work}
- {This was made by Tran V.Anh AKA Wade Rollins}
- {DON'T STEAL THIS}
- Program Typing_Test;
- Uses crt;
- Var
- St: Array [1..100] of String;
- i, j, length, so: Integer;
- Procedure Pout(m: String; i: Integer);
- Begin
- Writeln(m);
- Delay(i);
- End;
- Procedure Intro;
- Begin
- clrscr;
- Pout('You are good at 10 fingers-typing???',1000);
- Pout('Well let''s test it now!!!',1000);
- End;
- Procedure Title;
- Begin
- clrscr;
- TextColor(Black);
- TextBackGround(White);
- For i:=1 to 25 do
- Writeln(' ');
- Gotoxy(33,1);
- Write('T'); Delay(1000);
- Write('Y'); Delay(1000);
- Write('P'); Delay(1000);
- Write('I'); Delay(1000);
- Write('N'); Delay(1000);
- Write('G '); Delay(1000);
- Write('T'); Delay(1000);
- Write('E'); Delay(1000);
- Write('S'); Delay(1000);
- Write('T'); Delay(1000);
- Gotoxy(32,1); TextColor(115);
- Write('Press Enter!!!');
- Readln;
- TextColor(Black);
- End;
- Procedure ReadText;
- Var
- i, number: Integer;
- LOL: String;
- ch: char;
- f: text;
- Begin
- length:=0;
- Assign(f,'TEXT.TXT'); Reset(f);
- i:=0; j:=1; LOL:='';
- While not eof(f) do
- Begin
- Read(f,ch);
- LOL:=LOL+ch;
- i:=i+1; length:=length+1;
- If (i>=256) or (eof(f)) then
- Begin
- St[j]:=LOL;
- LOL:='';
- j:=j+1; i:=0;
- End;
- End;
- so:=j;
- End;
- Procedure Typing;
- Var
- i, j, arr, k: Integer;
- key: char;
- Begin
- clrscr; Writeln(length);
- For i:=1 to so do
- Write(St[i]); Gotoxy(1,2);
- j:=0; i:=1; arr:=1; k:=1;
- Repeat
- key:=ReadKey;
- While (key<>St[arr][k]) and (key<>#27) do
- Begin
- key:=Readkey;
- End;
- k:=k+1; j:=j+1;
- If k>=256 then
- Begin
- arr:=arr+1;
- k:=1;
- End;
- TextColor(Red);
- Write(key);
- Until (j>=length) or (key=#27);
- End;
- Begin
- clrscr;
- Intro;
- Title;
- ReadText;
- Typing;
- Readln;
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement