Program for search extremum lazarus / 61-Beginners ---------------------------------------------------------------------- slava33 · 2019-06-02 17:43 Help me make a program "Search for extremum" by the block diagram ---------------------------------------------------------------------- marcov · 2019-06-02 18:23 So how far did you get? Where is the code of your tries? We help people with problems, but we don't write complete assignment code. ---------------------------------------------------------------------- jamie · 2019-06-02 21:08 Lets see, it's Sunday here and we have a noob asking to get his home work done.. I bet the head is pounding from all the party activities over the weekend.. Good luck with your endeavor. ---------------------------------------------------------------------- VTwin · 2019-06-02 21:43 Quote from: jamie on June 02, 2019, 11:08:53 pmLets see, it's Sunday here and we have a noob asking to get his home work done.. I bet the head is pounding from all the party activities over the weekend.. Good luck with your endeavor. ---------------------------------------------------------------------- slava33 · 2019-06-02 21:49 Wow, I thought foreign forums would be more loyal. If you had seen how badly they teach in Russia... Everything has already been decided on the Russian forum and without further ado. The topic is closed.  program Project1; label   a1,a2; function f(xx: double):double; begin   f:= xx; end; var   A,B,H,E,n: double;   x,x1,x0: double;   y,y1: double; begin   writeln('Введите значение аргумента А:');   Readln(A);   writeln('Введите значение аргумента B:');   Readln(B);   writeln('Введите значение аргумента E:');   Readln(E);   writeln('Введите значение аргумента n:');   Readln(n);   H:= (B - A)/n;   a1:   x:= A;   a2:   y:= f(x);   x1:= x + H;   y1:= f(x1);   if y < y1 then    begin      x:= x + H;      if x <= B - H  then       goto a2      else       writeln('Экстремума нет:');    end   else     begin       if y1 - y <= E then         begin           x0:=(B - 2*H)/2;           writeln('Результат вычислений:');           writeln('x0 = ',x0:0:4,'; f(x) = ',f(x):0:4,'; E = ',E:0:4,'; H = ',H:0:4);         end       else         begin           H:= H/4;           A:= x1 - 2*H;           B:= x1;           goto a1;         end;     end;     Readln; end. ---------------------------------------------------------------------- lucamar · 2019-06-02 22:44 Quote from: slava33 on June 02, 2019, 11:49:19 pmWow, I thought foreign forums would be more loyal. We are "loyal". What we are not is pansies. We don't come here to make your home-work (or whatever it is) for you, but to help you do it yourself. Why? Because otherwise you'll not learn. If you had come with a failing program (even a bad one!), we would have probably teared it apart telling you where and, more important why it failed and showing you ways to make it better. Look around in this forum if you dont believe me. Instead, you give us just a diagram and ask for the corresponding program. Come on! Coding from a flowchart is (still) a basic technique you should learn to master, much more with such an easy to translate chart. The folks in the Russian forum haven't made you any favor. ---------------------------------------------------------------------- sash · 2019-06-03 07:54 Quote from: slava33 on June 02, 2019, 11:49:19 pmWow, I thought foreign forums would be more loyal. If you had seen how badly they teach in Russia Please just don't. First, what I really see is that instead of getting learned you're trying to cheat with your homework. Second, I live there. And I studied when there were no internet, not even modems, only printed books. And we had a "machine time schedule" for a program to be typed-in and run. Guys, you have everything: GUI OSes, Google, broadband connection, smartphones, lots of examples and tutorials literally just for free. And yet you want to copy-paste your basic homework instead of real learning. Why do you study computers if you don't really like it? ---------------------------------------------------------------------- julkas · 2019-06-03 11:32 Quote from: sash on June 03, 2019, 09:54:53 amGuys, you have everything: GUI OSes, Google, broadband connection, smartphones, lots of examples and tutorials literally just for free. It's back side of the medal. ---------------------------------------------------------------------- jamie · 2019-06-03 15:10 @Slava33   You forgot a ABS function!  I won't say where but its there!