Program asd; uses crt; var a,b,c,max:integer; r:real; begin Write('Введите число A: '); Readln(a); Write('Введите число B: '); Readln(b); Write('Введите число C: '); Readln(c); If a>=b then max:=a else max:=b; If c>max then max:=c; r:=a+b+c; If (A>B) and (B>C) and (C>0) then Writeln('A= ',a*2,' B= ',b*2,' C= ',c*2); If (A<0) and (B<0) and (C<0) and (A<>B) and (B<>C) and (C<>A) then begin A:=max; B:=max; C:=max; Writeln('A= ',a,' B= ',b,' C= ',c); end else Writeln('Symma: ',r); end.
Type mas=array[1..93] of real; var i,w:byte;season:mas;t:real;
function temp(ses:mas;d:byte):real; var i:byte;s:real; begin s:=0; for i:=1 to d do s:=s+ses[i]; temp:=s; end;
begin
repeat writeln('Год високосный?1-да 0-нет'); read(w); if (w<>1) and (w<>0) then w:=2; until w<>2;
writeln('Введите зимние температуры за каждый день:'); for i:=1 to 90+w do readln(season[i]); t:=temp(season,90+w); writeln('Среднее арифметическое зимних температур: ',t/(90+w):5:3);
writeln('Введите весенние температуры за каждый день:'); for i:=1 to 92 do readln(season[i]); t:=temp(season,92); writeln('Среднее арифметическое весенних температур: ',t/92:5:3);
writeln('Введите летние температуры за каждый день:'); for i:=1 to 92 do readln(season[i]); t:=temp(season,92); writeln('Среднее арифметическое летних температур: ',t/92:5:3);
writeln('Введите осенние температуры за каждый день:'); for i:=1 to 92 do readln(season[i]); t:=temp(season,91); writeln('Среднее арифметическое осенних температур:',t/91:5:3); end.
(№ 1328) 1
(№ 1327) -45
Объяснение:
(№ 1328) 1010101_2 - 201_8 + 2D_16
1010101_2 = 1 * 2^6 + 0 * 2^5 + 1 * 2^4 + 0 * 2^3 + 1 * 2^2 + 0 * 2^2 + 1 * 2^0 = 64 + 0 + 16 + 0 + 4 + 0 + 1 = 85_10
201_8 = 2 * 8^2 + 0 * 8^1 + 1 * 8^0 = 128 + 0 + 1 = 129_10
2D_16 = 2 * 16^1 + 13 * 16^0 =32 + 13 = 45_10
85 - 129 + 45 = 1
(№ 1327) 1001101_2 - 261_8 + 37_16
1001101_2 = 1 * 2^6 + 0 * 2^5 + 0 * 2^4 + 1 * 2^3 + 1 * 2^2 + 0 * 2^2 + 1 * 2^0 = 64 + 0 + 0 + 8 + 4 + 0 + 1 = 77_10
261_8 = 2 * 8^2 + 6 * 8^1 + 1 * 8^0 = 128 + 48 + 1 = 177_10
37_16 = 3 * 16^1 + 7 * 16^0 = 48 + 7 = 55_10
77 - 177 + 55 = -45