var
str : string;
a, b : char;
count : integer;
begin
assign (input, 'file.txt'); reset (input);
while not eof do
begin
readln (str);
if length (str) > 1 then a := str[2]
else a := '1';
if length (str) > 1 then b := str[2]
else b := '1'; //Заведомо неверные данные
if (a ='+') and (b = '-') then inc (count);
end;
writeln (count);
end.
Нажать на объект правой кнопкой мыши.
var
a: array[1..5] of integer;
p,ot,i:integer;
begin
p:=0;
ot:=0;
for i:=1 to 5 do
readln(a[i]);
for i:=1 to 5 do begin
if a[i]>0 then
p:=p+1
else
ot:=ot+1;
end;
writeln('polozitelnich=', p, ' otrizatelnich=', ot);
end.
Const eps=0.001;
var x,xi,an,s:real; i,f:integer;
begin
readln(x);
xi:=1; f:=1; i:=0;
an:=xi/f; s:=an;
while abs(an)>eps do
begin
i:=i+1;
f:=f*i;
xi:=xi*x;
an:=xi/f;
s:=s+an;
end;
writeln('s = ',s:6:4,' e^',x:0:1,' = ',exp(x):6:4);
end.
Пример:
0.9
<span>s = 2.4595 e^0.9 = 2.4596</span>
Var a, b, c:integer;
Begin
Writeln('vvedite chisla');
Readln(a,b,c);
If (a>b) and (a>c) then writeln(a);
If (b>a) and (b>c) then writeln(b);
If (c>a) and (c>b) then writeln(c);
End.