Advertisement
ALTracer

lab1v8n1

Jun 20th, 2015
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.47 KB | None | 0 0
  1. program lab1v8;
  2. var
  3.   min:Real;
  4.  
  5. procedure ProcessData;
  6. var
  7.   x:array[1..6]of Real;
  8.   i:Integer;
  9. begin
  10.      x[1]:=(sin(1)-1)/(2*cos(1)+1);
  11.      min:=x[1];
  12.      for i:=2 to 6 do //however, we shouldn't store the whole array
  13.      begin
  14.         x[i]:=(sin(i)-1)/(2*cos(i)+1);
  15.         if x[i]<min then min:=x[i];
  16.      end;
  17. end;
  18.  
  19. procedure ExportData;
  20. begin
  21.      WriteLn(min:0:4);
  22. end;
  23.  
  24. //main
  25. begin
  26.      //ImportData;
  27.      ProcessData;
  28.      ExportData;
  29. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement