помогите составить программы для третьего и четвертого заданий срочно (вариант 5) в паскале
Answers & Comments
DeSex
Const a=12; b=19; var i: integer; z:real; begin for i:=a to b do z:=z+exp(sin(i)); writeln('Z=',z); end.
Const a=-10; b=19; var i: integer; x:real; begin for i:=a to b do begin x:=i; if i>a then writeln('F3(',x-0.5,')=',exp(sin(x-0.5))); writeln('F3(',x,')=',exp(sin(x))); end; end.
Const a=-10; b=19; var x:real; begin x:=a; while x<=b do begin writeln('F3(',x,')=',exp(sin(x))); x:=x+0.5; end; end.
Const a=-10; b=19; var x:real; begin x:=a; repeat writeln('F3(',x,')=',exp(sin(x))); x:=x+0.5; until x>b; end.
Answers & Comments
a=12;
b=19;
var
i: integer;
z:real;
begin
for i:=a to b do
z:=z+exp(sin(i));
writeln('Z=',z);
end.
Const
a=-10;
b=19;
var
i: integer;
x:real;
begin
for i:=a to b do
begin
x:=i;
if i>a then writeln('F3(',x-0.5,')=',exp(sin(x-0.5)));
writeln('F3(',x,')=',exp(sin(x)));
end;
end.
Const
a=-10;
b=19;
var
x:real;
begin
x:=a;
while x<=b do
begin
writeln('F3(',x,')=',exp(sin(x)));
x:=x+0.5;
end;
end.
Const
a=-10;
b=19;
var
x:real;
begin
x:=a;
repeat
writeln('F3(',x,')=',exp(sin(x)));
x:=x+0.5;
until x>b;
end.