Arithmetic in Pascal

Long time I don’t post about Pascal in this blog,and in this time,I wanna to post about the functional in Pascal,that’s arithmetic.

Arithmetic was used to operate the mathematics operation.That’s several arithmetic function in Pascal :

1.ABS(function)

ABS was used to give the absolute value from an argument.

Syntax = ABS(x);

2.ARCTAN(function)

ARCTAN was used to give a value from arctangent function from Goniometri calculation.

Syntax = ARCTAN(x);

3.COS(function)

COS was used to give a value from conious function.

Syntax = COS(x);

4.EXP(function)

EXP was used to calculate a rank value from e number (natural number)

Syntax = EXP(x);

5.FRAC(function)

FRAC was used to get a fraction value from a number.

Syntax = FRAC(x);

6.INT(function)

INT was used to give an integer value from a variable with cut a value behind coma.

Syntax = INT(x);

7.LN(function)

LN was used to calculate logarithm values from x value.

Syntax = LN(x);

8.SIN(function)

SIN was used to give values from Sinus function.

Syntax = SIN(x);

9.SQR(function)

SQR was used to calculate square values from a number.

Syntax = SQR(x);

10.SQRT(function)

SQRT was used to calculate root values from a number.

Syntax = SQRT(x);

~~~

Let’s make this project,ar.pas

program arithmetic;
uses wincrt;
var x:real;
begin
clrscr;
write('Fill it with your favorite number..');
readln(x);
writeln;
writeln;
writeln('You have choosen a fantastic number ! : ',x);
writeln;
writeln('If it square = ',sqr(x));
writeln('If it rooted = ',sqrt(x));
writeln('If it was seen a cosinus values = ',cos(x));
writeln('If it was seen a sinus values = ',sin(x));
writeln('If it was seen a logarithm values = ',log(x));
end.

One thought on “Arithmetic in Pascal

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s