var a,b,c,d:real;
c1, c2, z1, z2:real;
begin
write('Введи числитель первой дроби: '); read(a);
write('Введи знаменатель первой дроби: '); read(b);
write('Введи числитель второй дроби: '); read(c);
write('Введи знаменатель второй дроби: '); read(d);
write(a + ' / ' + b + ' + ' + c + ' / ' + d + ' = ');
if(b = d) then begin
c1 := a + c;
write(c1 + ' / ' + b);
End else Begin
z1 := b * d;
c1 := (z1 / b) * a;
c2 := (z1 / d) * c;
z2 := c1 + c2;
write(z2 + ' / ' + z1);
end;
end.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var current, past, sum: real;
i, n: integer;
begin
current : = 10;
for i : = 1 to 10 do begin
writeln(i, ' ', current);
past : = current;
current : = current * 1.1;
end;
current : = 10; sum : = 0;
write('n = ');
read(n);
for i : = 1 to n do begin
sum : = sum + current;
past : = current;
current : = current * 1.1;
end;
writeln('за ', n, ' дней: ', sum);
end.
б) odd (trunc(10*P) )⇒odd (trunc(10*0,182) )⇒odd (trunc(1,82) )⇒odd(1)⇒true
в) not odd(n)⇒not odd(0)⇒not false⇒true
г) t and (P mod 3 = 0)⇒true and (10101 mod 3 = 0)⇒true and true⇒true
д) (x*y <> 0) and (y > x)⇒(2*1<>0)and(1>2)⇒true and false⇒false
е) a or not b⇒false or not true⇒false or false⇒false