var x, F: real; begin write('Введите х: '); readln(x); if ( x > -2.4 ) AND ( x < 5.7 ) then F := sqr(x) else F := 4; writeln('F = ', F); end.
№2
var x, F: real; begin write('Введите х: '); readln(x); if ( x > 0.2 ) AND ( x < 0.9 ) then F := sin(x) else F := 1; writeln('F = ', F); end.
№3
var a,b,c: real; begin write('Введите а: '); readln(a); write('Введите b: '); readln(b); write('Введите c: '); readln(c); if ( a < b ) AND ( b < c ) then writeln('a < b < c') else if ( b > a ) AND ( a > c ) then writeln('b > a > c') else writeln('Неравенства не выполняются'); end.
program fantscrin;
const n = 11;
var a: array [1..n] of integer;
i,s,p: integer;
begin
for i: =1 to n do
a[i]: = random(8)+4;
for i: =1 to n do
write(a[i], ' ');
s: =0;
p: =1;
for i: =1 to n do
if (i mod 2 = 0) then p: =p*a[i]
else s: =s+a[i];
writeln('');
writeln('сумма = ',s);
writeln('произведение = ',p);
end.
var x, F: real;
begin
write('Введите х: ');
readln(x);
if ( x > -2.4 ) AND ( x < 5.7 ) then F := sqr(x)
else F := 4;
writeln('F = ', F);
end.
№2
var x, F: real;
begin
write('Введите х: ');
readln(x);
if ( x > 0.2 ) AND ( x < 0.9 ) then F := sin(x)
else F := 1;
writeln('F = ', F);
end.
№3
var a,b,c: real;
begin
write('Введите а: ');
readln(a);
write('Введите b: ');
readln(b);
write('Введите c: ');
readln(c);
if ( a < b ) AND ( b < c ) then writeln('a < b < c')
else
if ( b > a ) AND ( a > c ) then writeln('b > a > c')
else
writeln('Неравенства не выполняются');
end.