This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
OldPascalProjects/Счёт_цифр_2/Счёт цифр 2.pas

76 lines
1.2 KiB
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var a,b,c,d,e,f,r,t,f1,f2,f3:integer;
begin
repeat
writeln('Укажите до какого числа считать');
readln(f);
writeln('Укажите задержку между расчётами (10=1сек)');
Readln(t);
r:=t*100;
loop 999999 do begin
if f>=10 then begin
f1:=f1+1;
f:=f-10;
end;
if f1>=10 then begin
f2:=f2+1;
f1:=f1-10;
end;
if f2>=10 then begin
f3:=f3+1;
f2:=f2-10;
end;
end;
repeat
a:=a+1;
if a>=10 then
begin
b:=b+1;
a:=a-10;
if b>=10 then
begin
c:=c+1;
b:=b-10;
if c>=10 then
begin
d:=d+1;
c:=c-10;
end;
end;
end;
if a=2 then
begin
Writeln('+ из едениц');
e:=e+1;
sleep(r);
end;
if b=2 then
begin
Writeln('+ из десятков');
e:=e+1;
sleep(r);
end;
if c=2 then
begin
Writeln('+ из сотен');
e:=e+1;
sleep(r);
end;
if (d=2) or (d=20) or (d=32) or (d=42) or (d=52) or (d=62) or (d=72) or (d=82) or (d=92) or (d=102) or (d=112) or (d=132) or (d=142) or (d=152) or (d=162) or (d=172) or (d=182) or (d=192) or (d=200) then
begin
Writeln('+ из тысяч');
e:=e+1;
sleep(r);
end;
if (d=22) or (d=122) then
begin
Writeln('+ из тысяч');
e:=e+2;
sleep(r);
end;
until (a=f) and (b=f1) and (c=f2) and (d=f3);
writeln(e);
until r=298348;
end.