Fivel
Опыт
4
+184
2
+2
1
+6
Навыки управления
Передний привод: 6 (35.9) +9.1
Задний привод: 0 (0) +0
Полный привод: 1 (0.2) +0.8
Тяжелый карт
Прочность: [9/10]
 
Уровень:
Привод: полный
Макс. скорость: 208 км/ч
Ускорение: 51
 
Торможение: 39
 
Управляемость: 49
 

Mitsubishi Colt
Прочность: [3/3]
 
Уровень:
Привод: передний
Макс. скорость: 186 км/ч
Ускорение: 15
 
Торможение: 10
 
Управляемость: 8
 

О себе
Program Project1;
{$APPTYPE CONSOLE}
Uses SysUtils;
type spisok=^Recspisok;
Recspisok=record
s:String; k:word; p:spisok; end;
var a,b,c,e:boolean; ch:char; st:string;
L,Fst,FEst,PEst,Est,temp:spisok; f:text;
label lb;
BEGIN
Fst:=nil;
Write('File >: '); ReadLn(st);
Assign(f,st); Reset(f); st:='';
REPEAT
L:=Fst;
a:=false; {a-признак конца слова}
b:=false; {b-признак наличия текущего слова в списке}
Read(f,ch);ch:=UpCase(ch);
{УДАЛЕНИЕ СЛОВ, ПЕЧАТАЕМЫХ ПРОЦЕДУРОЙ WRITE}
if ch='''' then begin
Repeat Read(f,ch); Until ch=''''; end;
{УДАЛЕНИЕ КОМЕНТАРИЕВ}
if ch='{' then begin
Repeat Read(f,ch); Until ch='}'; end;
{ПРОВЕРКА СИМВОЛА НА ПРИЗНАК КОНЦА СЛОВА}
if (ch=' ') or (ch='!') or (ch='"') or (ch='#') or (ch='$') or (ch='%')
or
(ch='&')or(ch='*')or(ch='+')or(ch=',')or(ch='-')or(ch='.') or
(ch='/')or(ch=':')or(ch=';')or(ch='<')or(ch='=')or(ch='>')or
(ch='@')or(ch='[')or(ch=']')or(ch='')or(ch='^')or(ch='`')or
(ch='|')or(ch='~')or(ch='(')or(ch=')')or(ch=#10)or(ch=#13)or(ch='}')
then a:=true;
{ЕСЛИ a=true, ТО СЛОВО СФОРМИРОВАНО. ПЕРЕХОДИМ К ПРОВЕРКЕ}
if (a=true) THEN BEGIN
IF (ST='BEGIN') THEN begin c:=false; e:=false; end;
IF (ST='TYPE') OR (ST='VAR') OR (ST='CONST') OR (ST='PROCEDURE') OR
(ST='FUNCTION') THEN
begin c:=true; e:=false; ST:=''; end;
IF (ST='LABEL') THEN begin c:=true; e:=true; ST:=''; end;
{УДАЛЕНИЕ ЗАРЕЗЕРВИРОВАННЫХ СЛОВ}
if (st='AND')or(st='XOR')or(st='NOT')or(st='OR')or(st='DIV') or
(st='MOD')or(st='SHL')or(st='SHR')or(st='NIL')or(st='OBJECT') or
(st='ARRAY')or(st='FILE')or(st='OF')or(st='RECORD')or(st='SET') or
(st='BYTE')or(st='SHORTINT')or(st='WORD')or(st='INTEGER')or
(st='LONGINT')or(st='STRING')or(st='BOOLEAN')or(st='REAL')or
(st='DOUBLE')or(st='EXTENDED')or(st='COMP')or(st='CHAR')or(st='END')
or(st='TEXT') then st:='';
{--УДАЛЕНИЕ ЦИФР В ОПИСАНИИ ПЕРЕМЕННЫХ--}
if (e=false) and (c=true) and ((st[1]='0')or(st[1]='1')or(st[1]='2')or
(st[1]='3')or(st[1]='4')or(st[1]='5')or(st[1]='6')or(st[1]='7')or
(st[1]='8')or(st[1]='9')) then st:='';

{--УДАЛЕНИЕ ЦИФР В ПРОГРАММЕ--}
if (e=false) and (c=false) and ((st[1]='0')or(st[1]='1')or(st[1]='2')or
(st[1]='3')or(st[1]='4')or(st[1]='5')or(st[1]='6')or(st[1]='7')or
(st[1]='8')or(st[1]='9')) and (ch<>':') then st:='';

{УВЕЛИЧЕНИЕ СЧЕТЧИКА СЛОВА НА ЕДИНИЦУ. ЕСЛИ ЭТО СЛОВО УЖЕ ЕСТЬ}
while (L<>nil) and (st<>'') do begin
if L^.s=st then begin L^.k:=L^.k+1; st:=''; b:=true; L:=L^.p; end
else L:=L^.p; end;
{ДОБАВЛЕНИЕ СЛОВА. ЕСЛИ ЕГО НЕТ В СПИСКЕ}
if (b=false) and (st<>'') and (c=true) then begin L:=Fst;
New(Fst); Fst^.s:=st; Fst^.k:=1; Fst^.p:=L; L:=Fst; st:=''; end else
st:='';

END ELSE st:=st+ch;
UNTIL ch=#26;

{ФОРМИРОВАНИЕ ОТСОРТИРОВАННОГО СПИСКА}
New(FEst); FEst^.s:=L^.s; FEst^.k:=L^.k; FEst^.p:=nil;
lb: L:=L^.p; Est:=FEst;
While L<>nil do BEGIN
IF L^.s>Est^.s THEN begin PEst:=Est; Est:=Est^.p; end;

IF Est=nil THEN begin New(temp); temp^.s:=L^.s; temp^.k:=L^.k;
temp^.p:=nil; PEst^.p:=temp; goto lb; end;

IF (L^.sFest) THEN begin
New(temp); temp^.s:=L^.s; temp^.k:=L^.k; temp^.p:=Est;
PEst^.p:=temp; goto lb; end;

IF (L^.snil do begin Write(Est^.s,'=',Est^.k,'; '); Est:=Est^.p;
end;
ReadLn;
END.
END.
Заправка: 100%
 
Карма: 0
Находится в Ravenhills на счету 1,722 LV