Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- n, i, ctr: integer;
- cp,a,b,dt: Real;
- function clc_function(cpos: Real): Real;
- var
- ret:real;
- begin
- while cpos > 4 do
- begin
- cpos := cpos - 4;
- end;
- if (cpos >= 0) and (cpos <= 1) then
- begin
- ret := cp + 1;
- clc_function := ret;
- end;
- if (cpos >= 1) and (cpos <= 3) then
- begin
- ret := (3 / 2) * (cpos - 1) - 1;
- clc_function := ret;
- end;
- if (cpos >= 3) and (cpos <= 4) then
- begin
- clc_function := 1;
- end;
- end;
- begin
- readln(a, b, n);
- cp := a;
- dt := (b - a) / n;
- ctr := 1;
- writeln('№ ТОЧКИ | АРГУМЕНТ | ЗНАЧЕНИЕ');
- for i := 1 to n do
- begin
- writeln(ctr:8, ' | ', cp:6:6, ' | ', clc_function(cp):8:8);
- ctr := ctr + 1;
- cp := cp + dt;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement