Sqrt() function
In this tutorial we’re going to write some mathematic formulas in
To write the above formula in
Sqrt((b*b-4*a*c)/(2*a))
Exp() function
There’s no power operator in Pascal Object. But it does not mean that we can not calculate the formula above. Before we calculate the formula, we have to describe it into an exponential function :
So we can write the formula using exp() function and ln() function :
Exp(b*ln(a))
Example :
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
x, y : real;
a, b, c : integer;
begin
// Insert user code here
a := 2;
b := 5;
c := 3;
x := sqrt((b*b-4*a*c)/(2*a));
writeln(x:0:1);
y := exp(b*ln(a));
writeln(y:0:0);
readln;
end.
hmmm
ReplyDeletethanks yaw,,
next time dicoba dechh
tipz na
:D
bisa dicoba neh, thank's sharingnya kawan
ReplyDeletemoga sukses selalu
@ darahbiroe & pakde sulas : you're welcome :)
ReplyDeletetutorial delphie y ?!
ReplyDeletewah boleh ne, skalian coba2 . thx y =)
omg, its very difficult for me
ReplyDeletenice tutorial friend
ReplyDeletegaptek gini nggak ngerti mas
ReplyDelete@Norland : thank you
ReplyDelete@berpikir positif : it will be easy when you start learning from the first tutorial in this blog
@blogger bumi lasinrang : thank you
@sang pemberontak : So, you have to learn then.. :)