| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- Uses Crt;
- Var
- i,j,Top,Bottom,Left,Right :byte;
- const
- f : array [1..7] of Real =
- (130.8, 146.8, 164.8, 174.6, 196.0, 220.0, 246.9);
- {-----------------------------------------------------------}
- Procedure Nota(a:real);
- Begin
- sound(Round(a));
- delay(300);
- Nosound
- End;
- {-----------------------------------------------------------}
- Procedure PlayMus;
- Begin
- nota(f[1]);
- nota(f[3]);
- nota(f[5]);
- nota(f[5]);
- nota(f[3]);
- nota(f[5]);
- nota(f[3]);
- nota(f[5]);
- nota(f[1]);
- nota(f[3]);
- nota(f[1]);
- nota(f[3]);
- nota(f[5]);
- nota(f[5]);
- nota(f[4]);
- nota(f[5]);
- nota(f[4]);
- nota(f[5]);
- nota(f[7]);
- nota(f[4]);
- nota(f[1]);
- nota(f[3]);
- nota(f[5]);
- nota(f[5]);
- nota(f[3]);
- nota(f[5]);
- nota(f[3]);
- nota(f[5]);
- nota(f[1]);
- nota(f[3]);
- nota(f[1]);
- nota(f[3]);
- nota(f[1]);
- nota(f[1]);
- nota(f[3]);
- nota(f[5]);
- nota(f[3]);
- nota(f[4]);
- nota(f[4]);
- nota(f[5]);
- nota(f[7]);
- nota(f[4]);
- nota(f[7]);
- nota(f[4]);
- nota(f[7]);
- nota(f[7]);
- nota(f[2]);
- nota(f[6]);
- nota(f[6]);
- nota(f[4]);
- nota(f[6]);
- nota(f[4]);
- nota(f[6]);
- nota(f[7]);
- nota(f[4]);
- End;
- Procedure DrawTable(l,r,t,b:byte);
- Var a : byte;
- Const
- lg = LightGray;
- Begin
- TextColor(cyan);
- GotoXY(32,2);
- Write('’ ¡«¨æ 㬮¦¥¨ï ');
- TextColor(LightMagenta);
- For a := 39-((abs(l-r)+1)*2) to (abs(l-r) +1)*4 + (38 - (abs(l-r) * 2)) do
- Begin
- GotoXY(a, 14 - (abs(t-b)+1) div 2 );
- Write('Í');
- GotoXY(a, (15-(abs(t-b)+1) div 2 ) + (abs(t-b)+1));
- Write('Í');
- end;
- Write('¼');
- GotoXY(WhereX-1, WhereY - 1 - (abs(t-b)+1));
- Write('»');
- TextColor(green);
- For a := l to r do
- begin
- GotoXY(37-((abs(l-r)+1)*2) + (a-l+1) * 4, 13 - (abs(t-b)+1) div 2);
- Write(a);
- end;
- For a := t to b do
- Begin
- GotoXY(36-(abs(l-r)+1)*2, (14 - (abs(t-b)+1) div 2 ) + a-t+1);
- If a < 10 then
- Begin
- TextColor(green);
- Write (a);
- TextColor(13);
- Write(' º');
- end
- else begin
- TextColor(green);
- Write(a);
- TextColor(13);
- Write(' º');
- end;
- GotoXY(WhereX-1, WhereY+1);
- Write('È');
- GotoXY((41-(abs(l-r)+1)*2) + (abs(l-r)+1)*4,
- (14 - (abs(t-b)+1) div 2) + a - t +1);
- Write('º');
- end;
- GotoXY(39-((abs(l-r)+1)*2), 14 - (abs(t-b)+1) div 2);
- Write('É')
- end; {DrawTable}
- {----------------------------------------------------------}
- Begin
- Clrscr;
- TextMode(CO80);
- TextColor(LightGray);
- Writeln('‚¢¥¤¨â¥ ç¨á« ¤® ª®â®àëå áâநâì â ¡«¨æã, à §¨æ ¬¥¦¤ã ª®â®à묨 ');
- Writeln('¬¥ìè¥ 18 ¨ ¯à®¨§¢¥¤¥¨¥ ¨¡®«ìè¨å ç¨á¥« ¬¥ìè¥ 1000 ');
- Write('¢ ä®à¬ â¥: «¥¢®¥ ¯à ¢®¥ ¢¥à奥 ¨¦¥¥ (1 10 2 15): ');
- Read(Left, Right, Top , Bottom);
- While (abs(left-right) > 17) or (abs(top-bottom) > 17) or
- (right*bottom > 1000) do
- begin
- Write('�®¯à®¡ã©â¥ ᮢ ');
- Read(Left, Right, Top , Bottom);
- end;
- Clrscr;
- DrawTable(Left, Right, Top , Bottom);
- TextColor(yellow);
- For i := top to bottom do
- begin
- for j := left to right do
- begin
- GotoXY((37-(abs(left-right)+1)*2) + (J-left+1) * 4,
- (14 - (abs(top-bottom)+1) div 2) + i-top+1);
- Write(I*J);
- end;
- end;
- GotoXY(30,24);
- TextColor(Black);
- TextBackGround(Black);
- PlayMus;
- TextColor(red);
- Write('... Press any key ... ');
- TextColor(lightgray);
- ReadKey
- End.
|