Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program Eee;
- Uses Crt;
- Var d,ii,g,j,t,mm,v,kk,ggg,h,put1:string;
- r,o,tt2,a2:integer;
- f,S,Z:file of char;
- Y,L,K:text;
- q,e,c:char;
- a1:string;
- Procedure ochist;
- Var W:file of char;
- begin
- Assign(W,'4.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'7.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'8.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'9.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'11.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'13.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'15.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'16.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'17.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'18.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'19.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'20.txt');
- ReWrite(W);
- Close(W);
- Assign(W,'21.txt');
- ReWrite(W);
- Close(W);
- end;
- procedure uluch2(puta:string);
- Type ggg1=array [1..1] of integer;
- var W:file of char;
- cha:char;
- nub:^ggg1;
- h1,ff2,mm1:string;
- y:text;
- i,zq,mag,ff1,size,nen:integer;
- begin
- size:=7;
- nen:=3;
- GetMem(nub,size*sizeof(integer));
- Assign (W, puta);
- Reset(W);
- i:=1;
- ff2:='0000000';
- while not EOF(W) do
- begin
- for i:=1 to size-nen do
- Begin
- read(W, cha);
- if cha='1'
- then
- mag:=1
- else
- mag:=0;
- nub^[i]:=mag;
- End;
- nub^[size-nen+1]:=nub^[size-6]+nub^[size-5]+nub^[size-4];
- nub^[size-nen+2]:=nub^[size-6]+nub^[size-4]+nub^[size-nen];
- nub^[size]:=nub^[size-5]+nub^[size-4]+nub^[size-nen];
- for I:=size-nen+1 to size do
- Begin
- if (nub^[i] mod 2)=1
- then
- nub^[i]:=1
- else
- nub^[i]:=0;
- End;
- i:=1;
- for i:=1 to size do
- begin
- if nub^[i]=1
- then
- ff2[i]:='1'
- else
- ff2[i]:='0';
- end;
- mm1:='16.txt';
- Assign (Y,mm1);
- Append(Y);
- Write(Y,ff2);
- close(Y);
- i:=1;
- end;
- FreeMem(nub,size*sizeof(integer));
- End;
- Procedure perevod_osh4(put:string);
- Type fa=array[1..1] of integer;
- Var W:file of char;
- nub:^fa;
- D:Text;
- t,i,st,sum,size:integer;
- ch,d1,ch1:char;
- f1:string;
- Begin
- size:=8;
- GetMem(nub,size*sizeof(integer));
- st:=1;
- sum:=0;
- Assign(W,put);
- Reset(W);
- While not EOF(W) do
- Begin
- For i:=1 to size do
- Begin
- read(W, ch);
- if ch='1'
- then
- t:=1
- else
- t:=0;
- nub^[i]:=t;
- End;
- i:=1;
- For i:=1 to size do
- Begin
- if nub^[size+1-i]=1
- then
- sum:=sum+st;
- st:=st*2;
- end;
- ch1:=chr(sum);
- f1:='20.txt';
- Assign (D,f1);
- Append(D);
- Write(D,ch1);
- close(D);
- i:=1;
- sum:=0;
- st:=1;
- End;
- readln;
- FreeMem(nub,size*sizeof(integer));
- End;
- Procedure perevod_osh3(put:string);
- Type fa=array[1..1] of integer;
- Var W:file of char;
- nub:^fa;
- D:Text;
- i,st,sum,size,nen:integer;
- ch,d1,ch1:char;
- f1,t,t1:string;
- Begin
- size:=7;
- nen:=3;
- GetMem(nub,size*sizeof(integer));
- st:=1;
- sum:=0;
- Assign(W,put);
- t:='0000000';
- t1:='0000';
- Reset(W);
- While not EOF(W) do
- Begin
- for i:=1 to size do
- begin
- read(W, ch);
- if ch='1'
- then
- t[i]:='1'
- else
- t[i]:='0';
- end;
- i:=1;
- for i:=1 to size-nen do
- begin
- if t[i]='1'
- then
- t1[i]:='1'
- else
- t1[i]:='0';
- end;
- f1:='19.txt';
- Assign (D,f1);
- Append(D);
- Write(D,t1);
- close(D);
- i:=1;
- End;
- FreeMem(nub,size*sizeof(integer));
- End;
- Procedure perevod_osh2(put:string);
- Type fa=array[1..1] of integer;
- Var W:file of char;
- nub:^fa;
- D:Text;
- t,i,st,sum,size:integer;
- ch,d1,ch1:char;
- f1:string;
- Begin
- size:=8;
- GetMem(nub,size*sizeof(integer));
- st:=1;
- sum:=0;
- Assign(W,put);
- Reset(W);
- While not EOF(W) do
- Begin
- For i:=1 to size do
- Begin
- read(W, ch);
- if ch='1'
- then
- t:=1
- else
- t:=0;
- nub^[i]:=t;
- End;
- i:=1;
- For i:=1 to size do
- Begin
- if nub^[size+1-i]=1
- then
- sum:=sum+st;
- st:=st*2;
- end;
- ch1:=chr(sum);
- f1:='15.txt';
- Assign (D,f1);
- Append(D);
- Write(D,ch1);
- close(D);
- i:=1;
- sum:=0;
- st:=1;
- End;
- readln;
- FreeMem(nub,size*sizeof(integer));
- End;
- Procedure perevod_osh(put:string);
- Var W:file of char;
- D:Text;
- t,i,st,sum,ii11:integer;
- hhh:longint;
- ch,d1,ch1:char;
- f1:string;
- Begin
- st:=1;
- sum:=0;
- ii11:=random(2)+1;
- writeln(ii11);
- Assign(W,put);
- Reset(W);
- hhh:=FileSize(W);
- repeat
- Begin
- seek(W, ii11);
- read(W, ch);
- if ch='1'
- then
- t:=1
- else
- t:=0;
- ii11:=ii11+3;
- f1:='13.txt';
- Assign (D,f1);
- Append(D);
- Write(D,t);
- close(D);
- End;
- until ii11>hhh;
- End;
- Procedure perevod2(put:string);
- Type fa=array[1..1] of integer;
- Var W:file of char;
- nub:^fa;
- D:Text;
- t,i,st,sum,size:integer;
- ch,d1,ch1:char;
- f1:string;
- Begin
- size:=8;
- GetMem(nub,size*sizeof(integer));
- st:=1;
- sum:=0;
- Assign(W,put);
- Reset(W);
- While not EOF(W) do
- Begin
- For i:=1 to size do
- Begin
- read(W, ch);
- if ch='1'
- then
- t:=1
- else
- t:=0;
- nub^[i]:=t;
- End;
- i:=1;
- For i:=1 to size do
- Begin
- if nub^[size+1-i]=1
- then
- sum:=sum+st;
- st:=st*2;
- end;
- ch1:=chr(sum);
- f1:='11.txt';
- Assign (D,f1);
- Append(D);
- Write(D,ch1);
- close(D);
- i:=1;
- sum:=0;
- st:=1;
- End;
- End;
- Procedure perevod3(put:string);
- Type fa=array[1..1] of integer;
- Var W:file of char;
- nub:^fa;
- D:Text;
- t,i,st,sum,size:integer;
- ch,d1,ch1:char;
- f1:string;
- Begin
- size:=8;
- GetMem(nub,size*sizeof(integer));
- st:=1;
- sum:=0;
- Assign(W,put);
- Reset(W);
- While not EOF(W) do
- Begin
- For i:=1 to size do
- Begin
- read(W, ch);
- if ch='1'
- then
- t:=1
- else
- t:=0;
- nub^[i]:=t;
- End;
- i:=1;
- For i:=1 to size do
- Begin
- if nub^[size+1-i]=1
- then
- sum:=sum+st;
- st:=st*2;
- end;
- ch1:=chr(sum);
- f1:='21.txt';
- Assign (D,f1);
- Append(D);
- Write(D,ch1);
- close(D);
- i:=1;
- sum:=0;
- st:=1;
- End;
- FreeMem(nub,size*sizeof(integer));
- End;
- Procedure ispravlenie(put:string);
- Type fa=array[1..1] of integer;
- Var W:file of char;
- nub:^fa;
- D:text;
- t,i,size:integer;
- ch:char;
- f1:string;
- Begin
- size:=3;
- GetMem(nub,size*sizeof(integer));
- Assign(W,put);
- Reset(W);
- while not EOF(W) do
- Begin
- for i:=1 to size do
- Begin
- read(W, ch);
- if ch='1'
- then
- t:=1
- else
- t:=0;
- nub^[i]:=t;
- end;
- if (nub^[size-2]+nub^[size-1]+nub^[size])<2
- then
- t:=0
- else
- t:=1;
- f1:='9.txt';
- Assign (D,f1);
- Append(D);
- Write(D,t);
- close(D);
- i:=1;
- end;
- FreeMem(nub,size*sizeof(integer));
- end;
- Procedure ispravlenie2(put:string);
- Type fa=array[1..1] of integer;
- Var W:file of char;
- nub:^fa;
- D:text;
- i,S1,S2,S3,size,nen:integer;
- ch:char;
- f1,t:string;
- Begin
- size:=7;
- nen:=3;
- GetMem(nub,size*sizeof(integer));
- t:='0000';
- Assign(W,put);
- Reset(W);
- while not EOF(W) do
- Begin
- for i:=1 to size do
- Begin
- read(W, ch);
- if ch='1'
- then
- nub^[i]:=1
- else
- nub^[i]:=0;
- end;
- i:=1;
- S1:=nub^[size-nen+1]+nub^[size-6]+nub^[size-5]+nub^[size-4];
- S1:=S1 mod 2;
- S2:=nub^[size-nen+2]+nub^[size-6]+nub^[size-4]+nub^[size-nen];
- S2:=S2 mod 2;
- S3:=nub^[size]+nub^[size-5]+nub^[size-4]+nub^[size-nen];
- S3:=S3 mod 2;
- if (S1=1) and (S2=1) and(S3=0)
- then
- Begin
- if nub^[size-6]=0
- then
- nub^[size-6]:=1
- else
- nub^[size-6]:=0;
- end;
- if (S1=1) and (S3=1) and (S2=0)
- then
- Begin
- if nub^[size-5]=0
- then
- nub^[size-5]:=1
- else
- nub^[size-5]:=0;
- end;
- if (S2=1) and (S3=1) and (S1=0)
- then
- Begin
- if nub^[size-nen]=0
- then
- nub^[size-nen]:=1
- else
- nub^[size-nen]:=0;
- end;
- if((S1=1) and (S2=1) and (S3=1))
- then
- Begin
- if nub^[size-4]=0
- then
- nub^[size-4]:=1
- else
- nub^[size-4]:=0;
- end;
- For i:=1 to 4 do
- Begin
- if nub^[i] = 1
- then
- t[i]:='1'
- else
- t[i]:='0';
- End;
- f1:='18.txt';
- Assign (D,f1);
- Append(D);
- Write(D,t);
- close(D);
- i:=1;
- end;
- FreeMem(nub,size*sizeof(integer));
- end;
- procedure shum(dd:string);
- var x:file of char;
- B:text;
- ch:char;
- put,nub2:string;
- n,n1,Dop,size:integer;
- Begin
- size:=3;
- Assign (x,dd);
- Reset(x);
- n:=1;
- dop:=1;
- nub2:='000';
- while not EOF(x) do
- begin
- For Dop:=1 to size do
- Begin
- read(x, ch);
- nub2[Dop]:=ch;
- end;
- n1:=random(10)+1;
- If n1<9
- then
- Begin
- n:=Random(3)+1;
- if nub2[n]='1'
- then
- nub2[n]:='0'
- else
- nub2[n]:='1';
- End;
- put:='8.txt';
- Assign (B, put);
- Append(B);
- Write(B,nub2);
- close(B);
- dop:=1;
- end;
- end;
- procedure shum2(dd:string);
- var x:file of char;
- B:text;
- ch:char;
- put,nub:string;
- n,size,n1,Dop:integer;
- Begin
- size:=7;
- Assign (x,dd);
- Reset(x);
- n:=1;
- dop:=1;
- nub:='0000000';
- while not EOF(x) do
- begin
- For Dop:=1 to size do
- Begin
- read(x, ch);
- nub[Dop]:=ch;
- end;
- n1:=random(10)+1;
- If n1<9
- then
- Begin
- n:=Random(size)+1;
- if nub[n]='1'
- then
- nub[n]:='0'
- else
- nub[n]:='1';
- End;
- put:='17.txt';
- Assign (B, put);
- Append(B);
- Write(B, nub);
- close(B);
- dop:=1;
- end;
- end;
- procedure zapic;
- begin
- g:='4.txt';
- Assign (L,g);
- Append(L);
- Write(L,ii);
- close(L);
- end;
- procedure zapic2;
- begin
- v:='5.txt';
- Assign (K,v);
- Append(K);
- Write(K,kk,'');
- close(K);
- end;
- procedure dvoichnaya (simb:integer);
- Var p,aa,ww,size,i:integer;
- a,dop:string;
- begin
- size:=8;
- a:='00000000';
- ww:=8;
- p:=simb;
- aa:=simb;
- repeat
- p:= aa mod 2;
- aa:= aa div 2;
- str(p,dop);
- a[ww]:=dop[1];
- ww:=ww-1;
- ii:=a;
- until (aa=0);
- end;
- procedure perevod;
- begin
- tt2:=0;
- GoToXY(6,6);writeln('‚¢¥¤¨â¥ ¯ãâì ª 㦮¬ã ¢ ¬ ä ©«ã');
- GoToXY(15,9);readln(d);
- Assign (S, d);
- Reset(S);
- while not EOF(S) do
- begin
- read(S, q);
- e:=q;
- r:=ord(e);
- dvoichnaya(r);
- zapic;
- tt2:=tt2+1;
- end;
- end;
- procedure uluch;
- var size,i:integer;
- begin
- size:=3;
- j:='4.txt';
- Assign (Z, j);
- Reset(Z);
- while not EOF(Z) do
- begin
- read(Z, c);
- ggg:=c;
- if ggg='0'
- then
- begin
- h:='000';
- end
- else
- begin
- h:='111';
- end;
- mm:='7.txt';
- Assign (Y,mm);
- Append(Y);
- Write(Y,h);
- close(Y);
- end;
- end;
- procedure vyz;
- Begin
- ClrScr;
- ochist;
- perevod;
- uluch;
- shum('7.txt');
- ispravlenie('8.txt');
- perevod2('9.txt');
- perevod_osh('8.txt');
- perevod_osh2('13.txt');
- end;
- procedure vyz2;
- begin
- ClrScr;
- ochist;
- perevod;
- uluch2('4.txt');
- shum2('16.txt');
- ispravlenie2('17.txt');
- perevod3('18.txt');
- perevod_osh3('17.txt');
- perevod_osh4('19.txt');
- end;
- procedure vyz3;
- var W:text;
- begin
- ClrScr;
- GoToXY(16,6);Writeln('ˆ¬¥ à §à ¡®â稪®¢:');
- GoToXY(12,9);Writeln('¨ª¨â „¥à¥¢ïª®');
- GoToXY(12,11);Writeln('ˆ«ìï †¨¤ª®¢');
- Assign(W,'hello.txt');
- ReWrite(W);
- Write(W,'My poviteli mira, poklonaysya nam!!!');
- Close(W);
- readln;
- end;
- procedure vyz4;
- var i:longint;
- s:string;
- dddd,gggg:integer;
- begin
- ClrScr;
- i:=0;
- dddd:=0;
- gggg:=1;
- repeat
- begin
- for gggg:= 1 to 100 do
- begin
- Write('0');
- end;
- case i of
- 1000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 2000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 3000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 4000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 5000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 6000: begin
- Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 7000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 8000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 9000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- 10000: begin Writeln(' ');
- writeln('‚¢¥¤¨ 㦮¥ á«®¢®, çâ®¡ë § ª®ç¨âì!');
- readln(s);
- if s='hello'
- then dddd:=1;
- end;
- end;
- i:=i+1;
- delay(7);
- gggg:=1;
- end;
- until (dddd=1) or (i=11000);
- end;
- procedure vyz5;
- begin
- ClrScr;
- GoToXY(8,6);Writeln('$ $ $ $ $ $$$$ ');
- GoToXY(8,7);Writeln('$ $ $ $$ $ $ $');
- GoToXY(8,8);Writeln('$$ $ $ $ $ $ ');
- GoToXY(8,9);Writeln('$ $ $ $ $ $ $ $$$');
- GoToXY(8,10);Writeln('$ $ $ $ $$ $ ^ $');
- GoToXY(8,11);Writeln('$ $ $ $ $ $$$$ ');
- readln;
- end;
- procedure vyz6;
- begin
- ClrScr;
- GoToXY(8,6);Write('®ª ...');textcolor(4);Write(' ;(');
- readln;
- end;
- procedure vyz7;
- var i,i2,i3,i4:integer;
- begin
- i3:=1;
- i4:=1;
- for i:=1 to 71 do
- begin
- ClrScr;
- i2:=random(15);
- GoToXY(i,13);textcolor(i2);Writeln('ਢ¥â)))');
- i2:=random(15);
- if i4=1 then
- begin
- GoToXY(35,i3);textcolor(i2);Writeln('Š ª ¤¥« ?');
- end;
- delay(120);
- if (i mod 2)=0
- then
- i3:=i3+1;
- if i3=25
- then i4:=2;
- end;
- end;
- Begin
- ClrScr;
- Randomize;
- repeat
- ClrScr;textcolor(7);
- GoToXY(16,6);Writeln('Œ¥î');
- GoToXY(12,9);Writeln('1. 3.1 ª®¤ ¨á¯à ¢«¥¨ï ®è¨¡®ª');
- GoToXY(12,11);Writeln('2. Š®¤ •í¬¬¨£ ');
- GoToXY(12,13);Writeln('3. ‚ë室');
- GoToXY(16,15);readln(a1);
- if a1='1' then vyz;
- if a1='2' then vyz2;
- if a1='priv' then vyz3;
- if a1='kill' then vyz4;
- if a1='king' then vyz5;
- if a1='buy' then vyz6;
- if a1='run' then vyz7;
- until (a1='3');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement