katanator
04.08.2021 20:31

Это код калькулятора(Паскаль),нужно,чтобы он был написан по столбикам,а не по строчкам,как сейчас.
program Calculator;
uses Functions,GrMouse,GrButton,Graph,GrOutPut,dos,crt;: string=' 7 8 9/< - x^y'+
' 4 5 6 * sin cos'+
' 1 2 3 - tg ktg'+
' 0 с. + = ы'+
' P R O E K T';
{$F+}: array [1.35] of TGrButton;,QuitButton: TGrButton;,SecondEdit: TGrButton;: TMouseStatus;: boolean;GetCaption (i: byte): string;,TempPos,Count: byte;: =0;: =0;x: =1 to Length (Captions) doCaptions [x] =' ' then inc (count);Count=i-2 then TempPos: =x;Count=i-1 then GetCaption: =copy (Captions,TempPos+2,x-TempPos-1);;;ChangeSysOfCount (SysOfCount: TSysCountStr);: string;SysOfCount [1] of
'D': begin;;SysOfCount [1] of
'D': begin SysCount: =DEC; DisButtons: =DECindexes; end;;(FParam);(SParam);(false);(SParam);(true);(FParam);;SetGroupEnabled (SysOfCount: TSysCountStr);: =ALLnumbers;i: =2 to 35 doi in DisButtons thenButtons [i] donot Enabled then(true);(SysOFCount);i: =2 to 35 doi in DisButtons then[i]. SetEnabled (False);: ='';;DrawingSquareOfButt (MaxTopInc,LeftOffs,TopOffs,BStartInd,BCount: word);: =0;j<=MaxTopInc doi: =BStartInd-1 to BStartInd+BCount-2 do[j+i+1]. Left: =i*50+LeftOffs;[j+i+1]. Top: =j*7+TopOffs;[j+i+1]. Draw;;(j,7);;;Action;: =true;;SetRadioClick (var ActButt,DisAct1,DisAct2: TGrButton);ActButt. FillColor=ActButt. FillColor then. FillColor: =ActButt. PressedColor;. FillColor: =1;. FillColor: =1;. Fill (ActButt. PressedColor);. Fill (DisAct1. FillColor);. FIll (DisAct2. FillColor);;;SetDECsys;(Buttons [8],Buttons [1],Buttons [15]);('DEC');;FstAction;(FirstEdit. FillColor=1) then. FillColor: =4;. FillColor: =1;. Draw;. Draw;(true);: =false;;;SndAction;(SecondEdit. FillColor=1) then. FillColor: =1;. FillColor: =4;. Draw;. Draw;(false). Init;. Init;. Init;. Init;i: =1 to 35 doButtons [i] do;: =GetCaption (i+1);;QuitButton do: =140;: =GetMaxY-50;: =20;: =370;: ='Quit';;;CEButton do: =GetMaxX-220;: =80;: =30;: =85;: ='CE';;;FirstEdit do: =GetMaxX-55;: =120;: ='Fst';: =4;;;SecondEdit do: =GetMaxX-55;: =170;: ='Snd';;;(30,140,1200,1,1);(30,170,120,2,6);(5,5,GetMaxX-5,GetMaxY-5);(OutXs,OutYs,OutXf,OutYf);
{/*End of drawing*/};;;[1]. PressedColor: =8;[8]. PressedColor: =8;[15]. PressedColor: =8;('DEC');(Buttons [8],Buttons [1],Buttons [15]);[8]. Action: =SetDECsys;[6]. Action: =BackSpaceSymbol;[24]. Action: =SetPlusMines;[27]. Action: =GetResult;
{}not Quit doi: =1 to 35 doButtons [i] doonClick (Action,MouseStatus) then(Length (Caption) =1) then(Caption [1] in SysCount) then(Caption);: =false;;(Caption [1]);Caption [1] ='с' then Calculated: =false;;: =0;KeyPressed then: =Ord (readkey);Key of
.57,46,97.103:UpCase (Char (Key)) in SysCount then(UpCase (Char (Key)));: =false;;
: begin;: =false;;
: SetEnterMode ('*'); {*}
: SetEnterMode ('+'); {+}
: SetEnterMode ('-'); {-}
: SetEnterMode ('/'); {/}
: exit. onClick (Action,MouseStatus);. OnClick (CEClick,MouseStatus);FirstEdit. OnClick (FstAction,MouseStatus) or (FActive) then FstAction;SecondEdit. OnClick (SndAction,MouseStatus) or (SActive) then SndAction;;;.

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
CorgiDog
20.01.2021 13:02

Объяснение:

Чтобы предотвратить возможные конфликты несовместимости разрешений при принудительной установке пользовательского режима, поставьте флажок на нижнем пункте настроек масштабирования.

В левом меню найдите вкладку под названием «Настройки масштабирования» и переместите ползунок на панели «Сжатая развертка – Растянутая развертка» так, чтобы изображение заполнило экран целиком. Кроме того, убедитесь, что изображение отображается строго точно по центру. В противном случае некоторые его части могут быть усечены.

0,0(0 оценок)
Ответ:
Bikoshm
07.06.2022 04:42
PascalABC.NET 3.3.5, сборка 1662 от 29.04.2018
Внимание! Если программа не работает, обновите версию!

begin
  var n:=ReadInteger('n=');
  WriteAllText('MyFile.txt',SeqRandom(n,-99,99).JoinIntoString);
  var (mn,mx):=(MaxInt,-MaxInt);
  foreach var line in ReadLines('MyFile.txt') do begin
    var a:=line.ToIntegers;
    (mn,mx):=(Min(a.Min,mn),Max(a.Max,mx))
    end;
  Writeln('Cумма min+max = ',mn,'+',mx,' = ',mn+mx);
  ReadAllText('MyFile.txt').Println // контрольный вывод файла
end.

Пример
n= 20
Cумма min+max = -99+71 = -28
62 -72 39 -93 -99 -46 -77 71 -12 13 -89 18 -17 19 -35 -62 30 17 -74 37
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота