1.
1)var a,b,c,P,S:real;beginread(a,b,c);P:=a+b+c;writeln('P=',P);P:=P/2;S:=sqrt(p*(p-a)*(p-b)*(p-c));writeln('S=',S);end.
2)var a,b,P,S:real;beginread(a,b);P:=2*(a+b);writeln('P=',P);S:=a*b;writeln('S=',S);end.
3)var a,P,S:real;beginread(a);P:=3.14*2*a;writeln('P=',P);S:=3.14*sqr(a);writeln('S=',S);end.
- байты на одной странице.
- байты на одном листе.
<span>Ответ: Примерно поместится 243 листов.</span>
//PascalABC.Net 3.2
begin
var time:=readinteger('Введите время суток: ');
if time in [0..5] then write ('Ночь')
else if time in [6..11] then write ('Утро')
else if time in [12..18] then write ('День')
else write ('Вечер');
end.
var a, b, c, d, x1, x2, t: real;
begin
writeln('Программа для решения неравенства ax^2 + bx + c > 0');
write('Введите коэффициенты a, b, c: ');
readln(a, b, c);
if a = 0 then begin
if b = 0 then
begin
if c > 0 then writeln('(-∞; +∞)')
else writeln('ø')<span>
end</span>
else if b > 0 then writeln('(', -c / b : 0 : 3, '; +∞)')
else writeln('(-∞; ', -c / b, ')')
end
else
begin
d := b * b - 4 * a * c;
if d = 0 then
begin
x1 := -b / (2 * a);
if a > 0 then writeln('(-∞; ', x1, ') U (', x1, '; +∞)')
else writeln('ø')
end
else if d > 0 then
begin
x1 := (-b - sqrt(d)) / (2 * a);
x2 := (-b + sqrt(d)) / (2 * a);
if x1 > x2 then
begin
t := x1;
x1 := x2;
x2 := t
end;
if a > 0 then writeln('(-∞; ', x1, ') U (', x2, '; +∞)')
else writeln('(', x1, '; ', x2, ')')
end
else
begin
if a > 0 then writeln('(-∞; +∞)')
else writeln('ø')
end
end
end.