function arif_mem(a, b: real; n: integer): real; begin if n = 1 then arif_mem := a; if n > 1 then arif_mem := arif_mem(a, b, n - 1) + b; end;
function arif_sum(a, b: real; n: integer): real; begin if n = 1 then arif_sum := a; if n > 1 then arif_sum := arif_sum(a, b, n - 1) + arif_mem(a, b, n); end;
begin write('введите первый член прогрессии:'); readln(a); write('введите разность прогрессии:'); readln(b); write('введите номер члена прогрессии:'); readln(n); writeln(n, '-й член прогрессии равен :', arif_mem(a, b, n):8:2); writeln('сумма ', n, ' членов прогрессии равна :', arif_sum(a, b, n):8:2); end.
a) favourite, merry, speak, sometimes, words
I am a student. My favourite subject is English. In the lesson we speak English, learn words, sing merry English songs. Sometimes we play games
b) draw, rubber, pencils, well, read
Ann is five. She can’t read and write. But she can draw very well. Ann can draw a horse, a flower and a car. She has a lot of coloured pencils and paints. She has a big rubber to get rid of bad pictures
c) school, break, time, Maths, count
My name is Ted. I live in London. I go to school. I like Maths. I can count well. I have many friends at school. We play games during the break. I have a good time at school
a) favourite, merry, speak, sometimes, words
I am a student. My favourite subject is English. In the lesson we speak English, learn words, sing merry English songs. Sometimes we play games
b) draw, rubber, pencils, well, read
Ann is five. She can’t read and write. But she can draw very well. Ann can draw a horse, a flower and a car. She has a lot of coloured pencils and paints. She has a big rubber to get rid of bad pictures
c) school, break, time, Maths, count
My name is Ted. I live in London. I go to school. I like Maths. I can count well. I have many friends at school. We play games during the break. I have a good time at school
var
a, b: real;
n: integer;
function arif_mem(a, b: real; n: integer): real;
begin
if n = 1 then arif_mem := a;
if n > 1 then arif_mem := arif_mem(a, b, n - 1) + b;
end;
function arif_sum(a, b: real; n: integer): real;
begin
if n = 1 then arif_sum := a;
if n > 1 then arif_sum := arif_sum(a, b, n - 1) + arif_mem(a, b, n);
end;
begin
write('введите первый член прогрессии:');
readln(a);
write('введите разность прогрессии:');
readln(b);
write('введите номер члена прогрессии:');
readln(n);
writeln(n, '-й член прогрессии равен :', arif_mem(a, b, n):8:2);
writeln('сумма ', n, ' членов прогрессии равна :', arif_sum(a, b, n):8:2);
end.