Infra_HDC icon

help - 07-SEP-2019

Infra_HDC | PRO | 09/07/19 06:15:12 PM UTC | 0 ⭐ | 7874 👁️ | Never ⏰ | []
Pascal |

570 B

|

None

|

0 👍

/

0 👎

program pro0001(output);
const
    N=10;
    A=0.55;
    B=1;
    step=(B-A)/(N-1);
var
    i: integer;
    x1: real;
function x(n: integer): real;
    begin
        x:=A+(step*(n-1));
    end;
function f(x: real): real;
    var y1, y2, y3: real;
    begin
        y1:=exp(ln(sin(x/2))*(3/2));
        y2:=exp(ln(exp(1.3*x)+exp(-1.3*x))/3);
        y3:=abs(x-7/9);
        f:=(y1+y2)/y3;
    end;
begin
    writeln('n, X, Y');
    for i:=1 to N do
        begin
            x1:=x(i);
            writeln(i,', ',x1:5:3,', ',f(x1):8:6);
        end; 
end.

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎