Do you know of any functions to find exponents in scar or how I could go about it? I was going to use logarithms but I don't think scar has natural log (ln) so I'm looking for another way.
Do you know of any functions to find exponents in scar or how I could go about it? I was going to use logarithms but I don't think scar has natural log (ln) so I'm looking for another way.
function Log10(X: Extended): Extended;
function Log2(X: Extended): Extended;
function LogN(Base, X: Extended): Extended;
SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
Programming Projects: NotePad | Tetris | Chess
or just
SCAR Code:Number := anumber * (anumber * exponent);
You can use the above.
Cut em2 it
Formerly known as Cut em2 it
There's also Pow(base, exponent);
The best way to contact me is by email, which you can find on my website: http://wizzup.org
I also get email notifications of private messages, though.
Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
Documentation | Source | Simba Bug Tracker on Github and Villavu )
My (Blog | Website)
Aah simple thanks guys.
hmm.. try..
SCAR Code:var
Base, Exponent, I, O: Integer;
begin
Base := 2;//Number
Exponent := 6;//To the what power?
O := Base;//Sets O as the Number
for I := 2 to Exponent do//For 2 to the Power.. NOT from one because you had to declare the variable...
O := O * Base;//Multiplying
WriteLn(IntToStr(O));//Writes the answer to the debug box...
end.
Hope i helped... Didn't even test it / nor see if it compiled.. xD
There are currently 1 users browsing this thread. (0 members and 1 guests)