(http://www.tehnari.ru/)
-   (http://www.tehnari.ru/f41/)
-   -   - (http://www.tehnari.ru/f41/t93977/)

Andrey7284 22.01.2014 03:54

-
 
,

:

program laba1_19;
Uses crt;
const n=20;
type mas=array[1..n]of integer;
var a :mas;
max,min,r,i:integer;
procedure vvod(var a:mas);
var i:integer; { () }
ch: char; { }
begin

TextColor (black); { }

ClrScr; { }
gotoxy(20,3); { }

Writeln(' ,');
gotoxy(13,4);
Writeln(' . . 20 ,');
gotoxy(7,5);
Writeln(' ');
gotoxy(35,6);
textattr:=green;
Writeln('!');
Textattr:=white;
gotoxy(21,7);
Writeln(' ');
gotoxy(21,8);
Writeln(' 2 100!');
gotoxy(40,12);
textattr:=yellow;
Writeln('');
gotoxy(40,13);
Writeln('');
gotoxy(49,14);
Writeln('');
gotoxy(40,15);
Writeln('');
gotoxy(20,24);
textattr:=white;
Writeln(' ');
Ch:=readkey; { }
ClrScr;
for i:=1 to n do
begin
Write(' ',i:2, '- :');
Readln(a[i]);
end;
end;


procedure vivod(var a:mas);
var i:integer;
begin
for i:=1 to n do
write(a[i],' ');
end;

Begin
vvod(a);
Writeln(' ');
vivod(a);
max:=0;
min:=30;
for i:=1 to n do
begin
if a[i]>max then max:=a[i];
if a[i]<min then min:=a[i];
end;
writeln;
writeln('Max= ',max,' Min= ',min);

r:=max-min;
for i:=1 to n do
if (i mod 2)=0 then a[i]:=r;
writeln ('');
vivod(a);
End.


GMT +4, : 04:11.

Powered by vBulletin® Version 4.5.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.